Brad_Mclain
Member
|
Using a Box instead of Capsule for Controller
Hi what I am trying to do is set-up my own horse model/animations in game and am currently trying to improve the collision with world objects and other characters. I am building upon the existing RPG2 horse code which uses a capsule for this.
I found this older thread which seems to suggest Controller's can only have capsule colliders. Is this true?
http://www.esenthel.com/community/showth...p?tid=2407
Is it possible to use a box instead of a capsule for this as it fits much better (almost perfectly)?
Do I need to use perhaps an Actor instead?
|
|
04-17-2011 05:52 AM |
|
siwykon
Member
|
RE: Using a Box instead of Capsule for Controller
I think that controller's can only have capsule colliders!
Why you want to use box? Capsule is better way to collide witch terrain (you can normal move, if you use box your model can have problems witch moving).
|
|
04-17-2011 06:11 AM |
|
Brad_Mclain
Member
|
RE: Using a Box instead of Capsule for Controller
Well the horizontal collisions with things such as buildings or other players are very inaccurate due to the shape of the capsule.
|
|
04-17-2011 06:16 AM |
|
siwykon
Member
|
RE: Using a Box instead of Capsule for Controller
You are a licensed developer and you can use source from Esenthel RPG2 (or somethink like this). There is a horse. And it have many small capsules on all bones (if I good remember).
|
|
04-17-2011 06:27 AM |
|
Esenthel
Administrator
|
RE: Using a Box instead of Capsule for Controller
only Capsule is supported.
Box has issues with rotating the box, when you rotate the horse.
|
|
04-17-2011 10:00 AM |
|
siwykon
Member
|
RE: Using a Box instead of Capsule for Controller
But is any way to use many capsules at one horse model?
|
|
04-17-2011 07:12 PM |
|
Dynad
Member
|
RE: Using a Box instead of Capsule for Controller
Other way is to give every bone a phys capsule. Just look at the Swing Collision Detection tutorial.
There is always evil somewhere, you just have to look for it properly.
(This post was last modified: 04-17-2011 07:34 PM by Dynad.)
|
|
04-17-2011 07:33 PM |
|
Brad_Mclain
Member
|
RE: Using a Box instead of Capsule for Controller
Could I perhaps use a capsule for the terrain collisions and use a box to check for collisions with other objects?
|
|
04-18-2011 04:27 AM |
|
siwykon
Member
|
RE: Using a Box instead of Capsule for Controller
It is good idea! Why you don't try? (I'm too create horse and I'm too have collisions problem, but I think that it is imposible).
It is posible to change capsule height and width, if yes then how?
(This post was last modified: 04-18-2011 04:50 AM by siwykon.)
|
|
04-18-2011 04:38 AM |
|
Brad_Mclain
Member
|
RE: Using a Box instead of Capsule for Controller
Well you can change the capsule height and width by changing the values of h and r when creating capsule.
Code:
ctrl.createCapsule(r,h,pos)
|
|
04-18-2011 06:25 AM |
|
siwykon
Member
|
RE: Using a Box instead of Capsule for Controller
First value is radius of capsule!
I need width.
When I change radius, capsule convert to ball and I can't move near horse.
Is any other way to create collisions for horse?
|
|
04-18-2011 10:02 AM |
|
Brad_Mclain
Member
|
RE: Using a Box instead of Capsule for Controller
My idea to use separate physics objects one for terrain collision and one for building collision failed, mainly due to the fact that all my buildings are embedded into terrain so there was no way to check them separately from the terrain. Converting them to something like constant was not good for performance.
I guess my option now is to probably write a custom controller to use with my horse instead of using the in built one. Perhaps something like Dynad suggested with a bone based collision model.
(This post was last modified: 04-19-2011 02:07 AM by Brad_Mclain.)
|
|
04-19-2011 02:07 AM |
|