1 registered members (AndrewAMD),
1,298
guests, and 2
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: Which is the best movement system, C or ent mo
[Re: Nomad]
#140151
07/09/07 02:06
07/09/07 02:06
|
Joined: Aug 2000
Posts: 7,490
Orange Brat
![](/ubb7/images/groups/mod.gif)
Senior Expert
|
![](/ubb7/images/groups/mod.gif)
Senior Expert
Joined: Aug 2000
Posts: 7,490
|
The c_instructions were created for use with the new ABT scene management (because they require the methods created in them for correct collision...you're player will walk through geometry is you use the original technique in an ABT build), although you can use them with BSP, too. Ent_move is deprecated and will be removed from the engine; however you can still use it's functionality with c_move by setting enable_polycollision to 0.5 and making sure you setting the c_instructions flag to USE_AABB (along with whatever flags you sest). New collision is the newer OBB. Consult c_move in the manual for particulars. AABB is faster but doesn't allow per poly collision or access to the newer collision techniques and according to the A7 manual is now a Pro feature only (along with BSP scene management). However, if you're using "old school" bounding boxes (and A4-mid-A6 code) then it's what you'll want to use. Quote:
USE_AABB P Uses an axis aligned bounding box (AABB) for collision, rather than an oriented bounding box (OBB). The AABB system is faster, but ignores the entity orientation on USE_BOX, treats models and sprites as boxes, and requires a BSP level. See collision for the difference between both systems.
My User Contributions master list - my initial post links are down but scroll down page to find list to active links
|
|
|
Re: Which is the best movement system, C or ent mo
[Re: Nomad]
#140152
07/09/07 16:10
07/09/07 16:10
|
Joined: Oct 2003
Posts: 827 22�21'24"N 114�07'30"E
Frederick_Lim
User
|
User
Joined: Oct 2003
Posts: 827
22�21'24"N 114�07'30"E
|
I am also fighting with this recently, and now I can get the collision reliable on block or terrain slope. Slope test Control: 1-5 select camera, WASD movement, cursor left/right to turn. I use engine default setting, I don't know is it correct but base on trial and error I discover that don't set the model too high from origin, if your model is a vehicle. Lower from the origin a bit, see the ma1.mdl in the zip. Subtract the "distance to grand" calculation a little, like -5.5 in my example, otherwise the model will sink in the ground. so the model raise a bit to the ground. Now the model "touch" the ground nicely. Code:
ext_force.z = max(-35*time_step, -(c_trace(my.x, temp.x, ignore_me|use_box)-5.5));
I am a newbie I don't know if there are better solution, I'd like to know the best practice as well, so any advise are welcome.
|
|
|
Re: Which is the best movement system, C or ent mo
[Re: Nomad]
#140154
07/10/07 06:26
07/10/07 06:26
|
Joined: Oct 2003
Posts: 827 22�21'24"N 114�07'30"E
Frederick_Lim
User
|
User
Joined: Oct 2003
Posts: 827
22�21'24"N 114�07'30"E
|
You are welcome Nomad. I am still learning and my example is based on AUM and other forum snippets, but still not achieve reliable collision. There are too few tips about collision with slope and terrain. And I just tested if I set the collision hull to symmetrical in all side, I think this way the collision shape will become spherical, the collision work more smoothly when the entity move between the terrain and level block, no shake no jump. I uploaded another example lets study together. Slope Test 2
|
|
|
Re: Which is the best movement system, C or ent mo
[Re: Frederick_Lim]
#140156
07/12/07 09:35
07/12/07 09:35
|
Joined: Jul 2007
Posts: 50
Nomad
OP
Junior Member
|
OP
Junior Member
Joined: Jul 2007
Posts: 50
|
Thanks again Frederick_Lim, your code example is great, everything works as it should. Interesting to note though that when I had a camera inside of the player function, the camera lagged terribly but when I used an external camera, it worked flawlesly. It also lagged when I disabled stencil_shadow! Lost about 20 fps though. To auto set your bounding box, simply apply c setminmax me after your fat and narrow flags and after a wait 1. I am still developing from it as a base to my Game script but all creds to you. Later... **PS voted you 5 stars for your great help ![](/ubbthreads/images/graemlins/smile.gif)
Last edited by Nomad; 07/12/07 09:38.
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|