MCPcopy Create free account
hub / github.com/carbonengine/trinity / GetMissPosition

Method GetMissPosition

trinity/Eve/SpaceObject/EveSpaceObject2.cpp:2634–2656  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2632}
2633
2634void EveSpaceObject2::GetMissPosition( const Vector3* hit, const Vector3* source, Vector3* out )
2635{
2636 if( m_boundingSphereRadius > 0.0f )
2637 {
2638 *out = m_boundingSphereWorldCenter;
2639
2640 if( hit && source )
2641 {
2642 Vector3 local( *hit - *out );
2643 Vector3 dir = Normalize( *hit - *source );
2644
2645 local -= dir * Dot( dir, local );
2646
2647 local = Normalize( local );
2648 const Vector3 off = local * m_boundingSphereWorldRadius * 1.125f;
2649 *out += off;
2650 }
2651 }
2652 else
2653 {
2654 GetDamageLocatorPosition( out, -1, true );
2655 }
2656}
2657
2658Vector3 EveSpaceObject2::GetWorldPosition()
2659{

Callers 1

UpdateMethod · 0.45

Calls 1

DotFunction · 0.50

Tested by

no test coverage detected