Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers AppGameKit Corner / Physic and character

Author
Message
Blendman
10
Years of Service
User Offline
Joined: 17th Feb 2014
Location: Arkeos
Posted: 2nd Jul 2016 18:03
Hi

i would like to know why the capsule for the character is higher than the box (player) ? And how I can fixe that ?

Thanks

(clic on the screen to see the matter)



AGK2 tier1 - http://www.dracaena-studio.com
Stab in the Dark software
Valued Member
21
Years of Service
User Offline
Joined: 12th Dec 2002
Playing: Badges, I don't need no stinkin badges
Posted: 3rd Jul 2016 16:48
Look at this post I explained it here.

https://forum.thegamecreators.com/thread/217420

Change these 2 lines.



You will no longer be able to see the capsule because it will be in side the box.
If you disable z depth you should be able to see it.
The coffee is lovely dark and deep,and I have code to write before I sleep.
Blendman
10
Years of Service
User Offline
Joined: 17th Feb 2014
Location: Arkeos
Posted: 3rd Jul 2016 18:32
Thanks, it works fine now
AGK2 tier1 - http://www.dracaena-studio.com
Blendman
10
Years of Service
User Offline
Joined: 17th Feb 2014
Location: Arkeos
Posted: 6th Jul 2016 18:45 Edited at: 6th Jul 2016 20:05
HI Stab

I would like to knwo if there is a technic to decrease the y position of my object with a character physic ?

Because it seems the capsule pivot is centered and all my 3D models (player, ennemies...) have their pivot at their feets.

We can see the matter here :


My player should be on the little mountain, and he's flying over .

Do you knwo How I can fixe that ?

Edit :
it seems the obj3offsetvec can fixe that with :
characterOffsetVec = CreateVector3( 0.0, 30.0, 0.0 )

in :



But How Can I get that y=30 ?
It's the height of my model (with its scale) ?

If I use :


But I don't understand the h (height of the model) * scale should be 30 and it's 40, or I need to use height/2 for this vector ?

EDIT 2 :

If I use
h = (GetObjectMeshSizeMaxY(player,1) + GetObjectMeshSizeMinY(player,1)) * scale, I can find 30

But I'm not sur that's the technic to get the height (y) for vector3 because it doesn't work with other 3D models.
AGK2 tier1 - http://www.dracaena-studio.com

Login to post a reply

Server time is: 2024-04-25 12:54:06
Your offset time is: 2024-04-25 12:54:06