mirror of
https://github.com/bloeys/physx-go.git
synced 2025-12-29 07:58:20 +00:00
Shapes+RigidActors+CreateExclusiveShape+add createRigid dynamic/static to physics
This commit is contained in:
@ -95,12 +95,18 @@ func (rd *RigidDynamic) SetGlobalPose(tr *Transform, autoAwake bool) {
|
||||
C.CPxRigidDynamic_setGlobalPose(rd.cRd, &tr.cT, C._Bool(autoAwake))
|
||||
}
|
||||
|
||||
func (rd *RigidDynamic) ToActor() *Actor {
|
||||
return &Actor{
|
||||
func (rd *RigidDynamic) ToActor() Actor {
|
||||
return Actor{
|
||||
cA: C.CPxRigidDynamic_toCPxActor(rd.cRd),
|
||||
}
|
||||
}
|
||||
|
||||
func (rd *RigidDynamic) ToRigidActor() RigidActor {
|
||||
return RigidActor{
|
||||
cRa: C.CPxRigidDynamic_toCPxRigidActor(rd.cRd),
|
||||
}
|
||||
}
|
||||
|
||||
func CreateDynamic(p *Physics, t *Transform, g *Geometry, m *Material, density float32, shapeOffset *Transform) *RigidDynamic {
|
||||
return &RigidDynamic{
|
||||
cRd: C.CPxCreateDynamic(p.cPhysics, &t.cT, g.cG, m.cM, C.float(density), &shapeOffset.cT),
|
||||
|
||||
Reference in New Issue
Block a user