Gamestudio Links
Zorro Links
Newest Posts
Z9 getting Error 058
by k_ivan. 04/25/26 19:13
ZorroGPT
by TipmyPip. 04/25/26 16:09
Stooq now requires an API key
by jcl. 04/13/26 09:42
Strange "Alien" Skull created with >Knubber<
by NeoDumont. 04/10/26 18:58
400 free seamless texture pack downl. here !
by NeoDumont. 04/08/26 19:55
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
3 registered members (3run, Grant, 1 invisible), 3,863 guests, and 14 spiders.
Key: Admin, Global Mod, Mod
Newest Members
valino, juergenwue, VladMak, Geir, ondrej
19209 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Animation problem ? #296286
10/30/09 18:03
10/30/09 18:03
Joined: Oct 2009
Posts: 90
WickWoody Offline OP
Junior Member
WickWoody  Offline OP
Junior Member

Joined: Oct 2009
Posts: 90
Hi, now I have another problem. I programming a 3rd person Adventure game, but there is a problem in "duck" animation. Animation seems successful but the player stands still in the air. Feet do not touch the ground.
Will understand better with this picture:
Duck:


Stand:


Thanks in advance.

Last edited by WickWoody; 10/30/09 18:05.
Re: Animation problem ? [Re: WickWoody] #296288
10/30/09 18:08
10/30/09 18:08
Joined: Oct 2007
Posts: 5,211
İstanbul, Turkey
Quad Offline
Senior Expert
Quad  Offline
Senior Expert

Joined: Oct 2007
Posts: 5,211
İstanbul, Turkey
hmm, set bounding box of player to it's new bounds and let your gravity script pull the player down.


3333333333
Re: Animation problem ? [Re: Quad] #296294
10/30/09 19:00
10/30/09 19:00
Joined: Oct 2009
Posts: 90
WickWoody Offline OP
Junior Member
WickWoody  Offline OP
Junior Member

Joined: Oct 2009
Posts: 90
No did not work or I can't. Marked as objects bbox with World Editor. Gravity script already exists. But did not work :S

Re: Animation problem ? [Re: WickWoody] #296297
10/30/09 19:23
10/30/09 19:23
Joined: Oct 2007
Posts: 5,211
İstanbul, Turkey
Quad Offline
Senior Expert
Quad  Offline
Senior Expert

Joined: Oct 2007
Posts: 5,211
İstanbul, Turkey
you have to update the "ducking" bbox by code. change min_x min_y etc of your model to new size, then gravity will pull it down.

if you cant do this, set your model's feet to the z=0 in med.


3333333333
Re: Animation problem ? [Re: Quad] #296302
10/30/09 20:12
10/30/09 20:12
Joined: Oct 2009
Posts: 90
WickWoody Offline OP
Junior Member
WickWoody  Offline OP
Junior Member

Joined: Oct 2009
Posts: 90
Do not do the same thing c_setminmax?

Re: Animation problem ? [Re: WickWoody] #296304
10/30/09 20:33
10/30/09 20:33
Joined: Oct 2009
Posts: 90
WickWoody Offline OP
Junior Member
WickWoody  Offline OP
Junior Member

Joined: Oct 2009
Posts: 90
Argh, never mind. Can I get an example?
If you want a model let me upload?


I found something at last. Want to give this code. The player comes into the floor of the half, leaving out key to the value needed to change?

vec_set(my.min_x, vector(0,0,15));

Last edited by WickWoody; 10/30/09 20:40.
Re: Animation problem ? [Re: WickWoody] #296305
10/30/09 20:35
10/30/09 20:35
Joined: Oct 2007
Posts: 5,211
İstanbul, Turkey
Quad Offline
Senior Expert
Quad  Offline
Senior Expert

Joined: Oct 2007
Posts: 5,211
İstanbul, Turkey
c_setminmax sets bounds using the first frame of the model file. for a diffrent frame(like one of the ducking frames) you have to use c_updatehull(ent,frame_number);
to update to bounding box regarding to that frame. Or you can set min_x,max_x manually to change the bounding box.

as a side note do not call c_updatehull every frame, call it once only when player changes stance(standing/ducking). I guess c_updatehull uses vertex positions to determine the bounds, more vertex your model has, longer the calculation gets, so performance wise you d only want to use it when it's necessary.


3333333333
Re: Animation problem ? [Re: Quad] #296356
10/31/09 07:56
10/31/09 07:56
Joined: Oct 2009
Posts: 90
WickWoody Offline OP
Junior Member
WickWoody  Offline OP
Junior Member

Joined: Oct 2009
Posts: 90
Hmm, so stand up when I need to use c_updatehull or c_setminmax.

Re: Animation problem ? [Re: WickWoody] #296398
10/31/09 16:25
10/31/09 16:25
Joined: Oct 2009
Posts: 90
WickWoody Offline OP
Junior Member
WickWoody  Offline OP
Junior Member

Joined: Oct 2009
Posts: 90
I did something with vec_set. Worked. But the problem now is:

Model goes down and bowed feet touch the ground is. But when you stand up to the waist to the floor is entered. Yet I think I need to do something with vec_set but do not know.


Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1