feat(scripting): expose PhysX rigidbody and raycast APIs
This commit is contained in:
@@ -311,6 +311,71 @@ namespace XCEngine
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
internal static extern void MeshRenderer_SetRenderLayer(ulong gameObjectUUID, int value);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
internal static extern int Rigidbody_GetBodyType(ulong gameObjectUUID);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
internal static extern void Rigidbody_SetBodyType(ulong gameObjectUUID, int value);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
internal static extern float Rigidbody_GetMass(ulong gameObjectUUID);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
internal static extern void Rigidbody_SetMass(ulong gameObjectUUID, float value);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
internal static extern float Rigidbody_GetLinearDamping(ulong gameObjectUUID);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
internal static extern void Rigidbody_SetLinearDamping(ulong gameObjectUUID, float value);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
internal static extern float Rigidbody_GetAngularDamping(ulong gameObjectUUID);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
internal static extern void Rigidbody_SetAngularDamping(ulong gameObjectUUID, float value);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
internal static extern void Rigidbody_GetLinearVelocity(ulong gameObjectUUID, out Vector3 velocity);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
internal static extern void Rigidbody_SetLinearVelocity(ulong gameObjectUUID, ref Vector3 velocity);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
internal static extern void Rigidbody_GetAngularVelocity(ulong gameObjectUUID, out Vector3 velocity);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
internal static extern void Rigidbody_SetAngularVelocity(ulong gameObjectUUID, ref Vector3 velocity);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
internal static extern bool Rigidbody_GetUseGravity(ulong gameObjectUUID);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
internal static extern void Rigidbody_SetUseGravity(ulong gameObjectUUID, bool value);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
internal static extern bool Rigidbody_GetEnableCCD(ulong gameObjectUUID);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
internal static extern void Rigidbody_SetEnableCCD(ulong gameObjectUUID, bool value);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
internal static extern void Rigidbody_AddForce(ulong gameObjectUUID, ref Vector3 force, int forceMode);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
internal static extern void Rigidbody_ClearForces(ulong gameObjectUUID);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
internal static extern bool Physics_Raycast(
|
||||
ref Vector3 origin,
|
||||
ref Vector3 direction,
|
||||
float maxDistance,
|
||||
out ulong hitGameObjectUUID,
|
||||
out Vector3 hitPoint,
|
||||
out Vector3 hitNormal,
|
||||
out float hitDistance,
|
||||
out int hitIsTrigger);
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
internal static extern void Rendering_SetRenderPipelineAssetType(Type assetType);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user