Jump to content

SetPhysicsMode and SetMass(0) : Entity still collides


 Share

Recommended Posts

In the docs :

Sets the entity physics mode.

 

 

Entity::SetPhysicsMode

 

 

Syntax

  • void SetPhysicsMode(int mode)

Parameters

  • mode: the physics mode to set. This value may be Entity::RigidBodyPhysics or Entity::CharacterPhysics.

Remarks

 

If you don't want an entity to use any physics at all, set the mass to 0 with Entity::SetMass().

 

 

---------------------------

 

But in game putting on a character controller in Lua script :

self.entity:SetColor(0,0,0)

self.entity:SetPhysicsMode(Entity.RigidBodyPhysics)

self.entity:SetMass(0)

 

Have no effect, collision still occurs with that character Physics ?

Stop toying and make games

Link to comment
Share on other sites

When alien is dead , just want it to stay where it is , no animation , no collision, no more character controller active.

I could use Release() on it , and create at same position same alien model without animation, no collision and in the dead position.

 

The simpler would be to be able to diable collision, physics on animated characters.

Stop toying and make games

Link to comment
Share on other sites

http://www.leadwerks.com/werkspace/page/documentation/_/command-reference/entity/entitysetcollisiontype-r35

 

Set it to like 50 or something. Collision types are just numbers and the engine has built-in collisions between certain numbers. If you use a number that isn't defined then you won't get any collisions at all.

 

 

http://www.leadwerks.com/werkspace/page/documentation/_/command-reference/collision-r778

 

These are the predefined constants (which just relate to numbers) that the engine has setup certain types of physics responses. I think there are 2 responses: Cause physical collision & register collision but no physical (triggers). If no response it setup (there should be a function for this somewhere. I know it's in C++ but not sure if it's exposed to Lua) then nothing should happen.

Link to comment
Share on other sites

  • 3 months later...

Not possible to simply remove physics collision ? by one function call ?

Use SetColliisionType(Collision::None) ;)

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...