About Store Forum Documentation Contact



Post Reply 
Using a Box instead of Capsule for Controller
Author Message
Brad_Mclain Offline
Member

Post: #1
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
Visit this user's website Find all posts by this user Quote this message in a reply
siwykon Offline
Member

Post: #2
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
Find all posts by this user Quote this message in a reply
Brad_Mclain Offline
Member

Post: #3
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
Visit this user's website Find all posts by this user Quote this message in a reply
siwykon Offline
Member

Post: #4
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
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #5
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
Find all posts by this user Quote this message in a reply
siwykon Offline
Member

Post: #6
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
Find all posts by this user Quote this message in a reply
Dynad Offline
Member

Post: #7
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
Visit this user's website Find all posts by this user Quote this message in a reply
Brad_Mclain Offline
Member

Post: #8
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
Visit this user's website Find all posts by this user Quote this message in a reply
siwykon Offline
Member

Post: #9
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
Find all posts by this user Quote this message in a reply
Brad_Mclain Offline
Member

Post: #10
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
Visit this user's website Find all posts by this user Quote this message in a reply
siwykon Offline
Member

Post: #11
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
Find all posts by this user Quote this message in a reply
Brad_Mclain Offline
Member

Post: #12
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
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply