Friday, 29.03.2024, 14:40
Welcome Guest | RSS
Main | File Catalog | Registration | Login
Site menu
Section categories
My games [9]
Some of my small projects
Contributions [42]
Some useful (I hope) stuff
My models [3]
Some models
User Contributions [2]
Some useful stuff hosted on my webpage from official forum members.
Linux [1]
Files related to Linux
Our poll
Is that ok to help for free?
Total of answers: 94
Statistics

Total online: 1
Guests: 1
Users: 0
Main » Files » Contributions

CCT PhysX 1.0
[ Download from this server (122.5 Kb) ] 24.01.2016, 23:17

I got an idea of making gravity for CCT (character controller) without any c_trace (thank you MasterQ32!), and after few tries I was able to make a nice movement code out of it. It's still not perfect (to my taste), but already could be used I guess. My movement code uses BOX shape for CCT (cause I prefer it over the capsule shape, and it was easier to get better results), but it had a problem.. Because of it's hard edges it got stuck on the level geometry from time to time (f.e. against cylinder made of level blocks), to prevent that I used two short c_traces towards the actual movement, to prevent player from coming too close to walls (and other obstacles), those traces could be used for interaction with some objects on the level (with ladder f.e.). Also I heard a lot of users complaining about how CCT collides vs RIGID bodies, it simply ignores them on movement (doesn't slow down etc) and pushes them away as crazy. I used those traces to prevent that too! It works exactly the same as with walls etc, player stops near by the RIGID body, and cause those traces using ACTIVATE_SCAN, I could easily push rigid bodies away from player's CCT (with his current moving speed). I also added one trace downwards, to make player stand on rigid bodies to get (almost) proper collision in all 3 dimensions. There is commented 'IGNORE_RIGID_BODIES' define right on the top of the 'main' script, uncomment it, if you want to see default collisions between CCT and RIGID bodies. This example also includes simple trigger (on ENTER and only by player) and simply cloth example (note that texture used for the cloth was taken from some Minecraft texture pack, so I'm not an owner of it, and it wasn't made by me (I'm talking about texture here!), make sure that you don't use it or share it for commercial use! It was used by me as a placeholder). Also, physX header was taken from HeelX thread (community version of physX, with lots of fixes etc). So I want to thank MasterQ32 once again, for obvious idea with gravity (which I was too dumb to see by myself :D ), and HeelX for his time to fix most of the crap that native physX had.

 

Best regards!

Category: Contributions | Added by: TRACER
Views: 492 | Downloads: 47 | Rating: 0.0/0
Total comments: 0
Name *:
Email *:
Code *:
Login form
Search
Site friends
  • Create a free website
  • Copyright MyCorp © 2024

    Make a free website with uCoz