Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/20/24 20:05
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, TedMar), 1,398 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
vec_for_vertex and vec_for_bone affecting ent_animate #305916
01/18/10 13:51
01/18/10 13:51
Joined: Mar 2006
Posts: 3,538
WA, Australia
J
JibbSmart Offline OP
Expert
JibbSmart  Offline OP
Expert
J

Joined: Mar 2006
Posts: 3,538
WA, Australia
G'day!

This is a little difficult to explain. My code mixes some animations using ent_animate(... ANM_ADD), and everything works smoothly. However, if I call vec_for_vertex or vec_for_bone even though it appears to be completely unrelated -- setting the camera position -- some of the animations fail.

The legs of my character are animated using ent_animate with no mode. The upper body of my character is then animated using ent_animate with ANM_ADD enabled, and the animation percentage is determined by the camera's tilt (with other factors keeping the animation percentage in the range of 0-100). This is so when the camera looks up, so does the character.

This normally works fine if the camera is attached to the character with simple vector functions that only consider the coordinates of his origin. However, if I have a function that attaches the camera's position to the model using vec_for_vertex or vec_for_bone, then the lower body will only animate if the upper-body's frame changes as well. That is, when the camera's tilt is not changing, and thus the upper body animation is not changing, the lower body will stay on the same frame.

I'll be happy to send you a cut-down version of the project if you need me to.

Thanks,

Jibb


Formerly known as JulzMighty.
I made KarBOOM!
Re: vec_for_vertex and vec_for_bone affecting ent_animate [Re: JibbSmart] #305920
01/18/10 14:28
01/18/10 14:28
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
When are you calling vec_for_vertex? Before, after, or inbetween the ent_anime calls? And are you resetting the animation before?

Re: vec_for_vertex and vec_for_bone affecting ent_animate [Re: jcl] #305929
01/18/10 15:07
01/18/10 15:07
Joined: Mar 2006
Posts: 3,538
WA, Australia
J
JibbSmart Offline OP
Expert
JibbSmart  Offline OP
Expert
J

Joined: Mar 2006
Posts: 3,538
WA, Australia
I call vec_for_vertex or vec_for_bone (I tried both) after all the animation calls. I call ent_bonereset_all(me) before any animation.

Cheers,

Jibb


Formerly known as JulzMighty.
I made KarBOOM!
Re: vec_for_vertex and vec_for_bone affecting ent_animate [Re: JibbSmart] #305930
01/18/10 15:11
01/18/10 15:11
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
Can you email the project to Support? We have to look into it.

vec_for_vertex and vec_for_bone indeed update the bones tree and transform the vertex. But this should not interfere with animation, and doesn't with our test projects. So we have to look into the project.

Re: vec_for_vertex and vec_for_bone affecting ent_animate [Re: jcl] #305935
01/18/10 15:58
01/18/10 15:58
Joined: Mar 2006
Posts: 3,538
WA, Australia
J
JibbSmart Offline OP
Expert
JibbSmart  Offline OP
Expert
J

Joined: Mar 2006
Posts: 3,538
WA, Australia
Sure thing. I have a few iterations of this project I'm working on backed up, so I'll send in the simplest one that demonstrates the issue.

Thanks,

Jibb


Formerly known as JulzMighty.
I made KarBOOM!
Re: vec_for_vertex and vec_for_bone affecting ent_animate [Re: JibbSmart] #306819
01/25/10 07:40
01/25/10 07:40
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
Thanks for the model. This was indeed a bug and will be fixed in the next update.

Re: vec_for_vertex and vec_for_bone affecting ent_animate [Re: jcl] #306876
01/25/10 15:12
01/25/10 15:12
Joined: Mar 2006
Posts: 3,538
WA, Australia
J
JibbSmart Offline OP
Expert
JibbSmart  Offline OP
Expert
J

Joined: Mar 2006
Posts: 3,538
WA, Australia
Thanks very much jcl laugh

Jibb


Formerly known as JulzMighty.
I made KarBOOM!
Re: vec_for_vertex and vec_for_bone affecting ent_animate [Re: JibbSmart] #307586
01/30/10 11:28
01/30/10 11:28
Joined: May 2009
Posts: 1,816
at my pc (duh)
darkinferno Offline
Serious User
darkinferno  Offline
Serious User

Joined: May 2009
Posts: 1,816
at my pc (duh)
hey jcl, was the fixing of this bug already done? i seem to be experiencing it with my GE contest entry

Re: vec_for_vertex and vec_for_bone affecting ent_animate [Re: darkinferno] #307668
01/30/10 21:25
01/30/10 21:25
Joined: May 2009
Posts: 1,816
at my pc (duh)
darkinferno Offline
Serious User
darkinferno  Offline
Serious User

Joined: May 2009
Posts: 1,816
at my pc (duh)
posted here because the problem seems related

http://www.youtube.com/watch?v=PBnQFNHd-t8

this is just to show a video of the bug i encountered after updating the gamestudio engine, this is the same game as before, with no code change, just the model was changed and the animations are now going all wrong, apparently it as to do with calling vec_for vertex/vec_for_bone on a model using ent_blend, thats what i assume because when i disable the vec_for_vertex which attaches the weapons, the model animates correctly, when i change weapons, the function using vec_for_vertex is paused for a second and you can see the anims run ok, if i constantly change weapons, the anims run fine, you can also see that even though the model isnt animated, the models are still in the correct position of what the model should be in, as if theyre still reading the animations correctly

this is the same game running on an older engine version and all animations and weapons are in place: http://www.youtube.com/watch?v=KvIQ7f91q_4&feature=channel

this bug also shows up in my other games including the Goldeneye game submitted to the contest

Re: vec_for_vertex and vec_for_bone affecting ent_animate [Re: darkinferno] #308349
02/02/10 21:44
02/02/10 21:44
Joined: Mar 2006
Posts: 3,538
WA, Australia
J
JibbSmart Offline OP
Expert
JibbSmart  Offline OP
Expert
J

Joined: Mar 2006
Posts: 3,538
WA, Australia
Do you have the private beta? The bug fix hasn't been in a public beta just yet.

Jibb


Formerly known as JulzMighty.
I made KarBOOM!
Page 1 of 2 1 2

Moderated by  jcl, Nems, Spirit, Tobias 

Gamestudio download | chip programmers | 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