YouGroove Posted February 9, 2014 Share Posted February 9, 2014 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 More sharing options...
Rick Posted February 9, 2014 Share Posted February 9, 2014 I think that was more to say if you didn't want any gravity set it to 0 instead of saying just physics in general. Link to comment Share on other sites More sharing options...
YouGroove Posted February 9, 2014 Author Share Posted February 9, 2014 ok, so only solution to have entity visible and "passable" ? It is not possible to disable collisions and have Entity still displayed like done in lot of games ? Stop toying and make games Link to comment Share on other sites More sharing options...
Rick Posted February 9, 2014 Share Posted February 9, 2014 I guess I'm not clear on what you are trying to do. Link to comment Share on other sites More sharing options...
YouGroove Posted February 9, 2014 Author Share Posted February 9, 2014 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 More sharing options...
Rick Posted February 9, 2014 Share Posted February 9, 2014 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 More sharing options...
YouGroove Posted February 9, 2014 Author Share Posted February 9, 2014 Not possible to simply remove physics collision ? by one function call ? Stop toying and make games Link to comment Share on other sites More sharing options...
Josh Posted May 11, 2014 Share Posted May 11, 2014 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 More sharing options...
Recommended Posts