flysouth Posted August 29, 2016 Author Share Posted August 29, 2016 only when the player hits the door's collision area. I am a bit puzzled by this... Collisions are dont have to be with a player. A non moving object can detect when something colides with it. Does this not mean thast the object is also constantly doing a check? Quote Link to comment Share on other sites More sharing options...
TorqueFan Posted August 29, 2016 Share Posted August 29, 2016 Without opening a great big can of worms...no, objects with collision meshes are not constantly doing collision checks while idling. All objects that could potentially collide against something else share one thing in common: they have to be moving to collide with something. This being the case, the moving object should be testing against things for collision - hence why we have the Player class searching for Triggers in its onContact() function. Unfortunately I don't have the time this morning to break down T3D's collision system, but I'll try to touch on the important parts: Objects that support collision will have a castRay() function in the class's source file, to be used when another object queries against it for collision. So if %objA is a rock with a collision and %objB is any other moving object - if %objB collides against %objA(the nonmoving rock) then %objA's castRay() code will be called to check for the collision. Players specifically will keep track of a collisionWorkingList of objects they are colliding with to help keep things in sync client/server. Off the top of my head I wanna say it was the physicsShape.cpp file where you could look for yourself and see what data is actually streamed and updated by a physics enabled object.IIRC the physics rep is only dealing with mass/buoyancy and things like that. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.