View Issue Details

IDProjectCategoryView StatusLast Update
0000075Medieval EngineersFeature Requestpublic2022-11-16 17:45
Reporterequinox Assigned To 
PrioritynormalSeverityminorReproducibilityhave not tried
Status newResolutionopen 
Product Version0.7.2 
Target Version0.7.5 (unreleased) 
Summary0000075: Provide new scriptable physics shape API

Currently the only way to create physics shapes using scripting is via MyPhysicsHelper's Init*Physics methods. These are already marked obsolete and provide a very limited API that only allows simple box/sphere shapes to be created.

The proposed API here is to create two new components, MyCustomPhysicsShapeComponent and MyCustomRigidBodyComponent, that will not be serialized -- it is the responsibility of the calling mod to create the same shape on the client and server.

MyCustomPhysicsShapeComponent will contain these methods for mod use.

ulong AddBox(in Matrix transform, Vector3 extents, float mass = 0);
ulong AddSphere(Vector3 translation, float radius, float mass = 0);
ulong AddCylinder(Vector3 vertexA, Vector3 vertexB, float radius, float mass = 0);
ulong AddCapsule(Vector3 vertexA, Vector3 vertexB, float radius, float mass = 0);
ulong AddConvexVertices(ListReader<Vector3> vertices, float mass = 0);
void Remove(ulong key);

MyCustomRigidBodyComponent will not contain any API designed for mod use.

TagsNo tags attached.


There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2020-10-24 22:09 equinox New Issue
2020-10-24 22:09 equinox Target Version => 0.7.4 (unreleased)
2022-11-16 17:45 equinox Target Version 0.7.4 (unreleased) => 0.7.5 (unreleased)