Collision doesn't move with animated part

GTA:V Modding with ZModeler3 discussion.

Moderator: madga182

Post Reply
Seb5a
Posts: 13
Joined: Wed Aug 18, 2021 10:04 pm
Contact:

Collision doesn't move with animated part

Post by Seb5a »

Hey,
I have a question if you know if is it possible to move collision with parent node. I am trying to make movable bed for flatbed and whole bed is moving but without collision. In zmodeler whole node with collision is moving but in GTA collision is still in same position.
Attachments
towbrick_half_anim.png
towbrick_normal_position.png
towbrick_track_editor.png
towbrick_ingame.png
User avatar
Oleg
Site Admin
Posts: 12236
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: Collision doesn't move with animated part

Post by Oleg »

I would suggest to make a test collision box (a big and tall) to ensure this box is actually on a truck's bed. (e.g player can climb or stand on this box). then play the animation and ensure the collision box stays where it was. May be collision is actually moved away but not working after animation?

Second, I would suggest to add children objects to animation too, so you have animation tracks for all objects/joints that actually change position in animation.
Seb5a
Posts: 13
Joined: Wed Aug 18, 2021 10:04 pm
Contact:

Re: Collision doesn't move with animated part

Post by Seb5a »

I'm sure that animation stays in their place, because i have those two boxes on the left of bed and they are still in same place after i run animation.

I tried to add collision to same track as that misc_e but whole animation stopped working.
I'll try as you said to add another track for collision with same move like misc_e
Seb5a
Posts: 13
Joined: Wed Aug 18, 2021 10:04 pm
Contact:

Re: Collision doesn't move with animated part

Post by Seb5a »

Tried to add collision to animation tracks but it's still doesn't work :(
User avatar
Oleg
Site Admin
Posts: 12236
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: Collision doesn't move with animated part

Post by Oleg »

one track = one animated object. you need to have several animation tracks in your animation to animate several objects at a time.
Seb5a
Posts: 13
Joined: Wed Aug 18, 2021 10:04 pm
Contact:

Re: Collision doesn't move with animated part

Post by Seb5a »

Oleg wrote: Sun Aug 07, 2022 10:52 am one track = one animated object. you need to have several animation tracks in your animation to animate several objects at a time.
I did that but like i wrote nothing happened. Collision is still in same way
Attachments
111.png
User avatar
Oleg
Site Admin
Posts: 12236
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: Collision doesn't move with animated part

Post by Oleg »

no, that's not what I meant. however, I see there are not children objects in misc_e (don't count misc_e [COL], it's not a part of exported hierarchy actually). Looks like animation does not control an associated collision objects properly. What are axes constrains/freedom options toggled on misc_e object? I think you should unlock position x/y/z options so the game can move the associated object. By "unlock" I mean "enable" these options in the options window. On screenshot below they are disabled (and rotations are enabled)
axes_constrains.jpg
Seb5a
Posts: 13
Joined: Wed Aug 18, 2021 10:04 pm
Contact:

Re: Collision doesn't move with animated part

Post by Seb5a »

Oleg wrote: Sun Aug 07, 2022 11:45 am no, that's not what I meant. however, I see there are not children objects in misc_e (don't count misc_e [COL], it's not a part of exported hierarchy actually). Looks like animation does not control an associated collision objects properly. What are axes constrains/freedom options toggled on misc_e object? I think you should unlock position x/y/z options so the game can move the associated object. By "unlock" I mean "enable" these options in the options window. On screenshot below they are disabled (and rotations are enabled)

axes_constrains.jpg
Tried that and nothing happened in game. I added RotationX to move that object down. Collision is still in the same position.
Attachments
222.png
User avatar
Oleg
Site Admin
Posts: 12236
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: Collision doesn't move with animated part

Post by Oleg »

disable "constrained" options there.
User avatar
Oleg
Site Admin
Posts: 12236
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: Collision doesn't move with animated part

Post by Oleg »

another idea to test is to remove passenger door and rename your misc_e as passenger door (update animation track name and re-save animation). The opening door does make its collision to follow too, so may be it will work this way? just to test things up.
Seb5a
Posts: 13
Joined: Wed Aug 18, 2021 10:04 pm
Contact:

Re: Collision doesn't move with animated part

Post by Seb5a »

Alright so disabling constrained didn't changed anything. Same situation was with doors. I just completly deleted passeneger doors and renamed misc_e to door_pside_f and collision is still not working. There is only one difference, after i renamed it i got ragdoll when i tried to jump from ground on that collision.
User avatar
Oleg
Site Admin
Posts: 12236
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: Collision doesn't move with animated part

Post by Oleg »

no more ideas then.
Is there any original game model that has specific in-game animation on a part with collision? May be worth checking it via import/export..
Seb5a
Posts: 13
Joined: Wed Aug 18, 2021 10:04 pm
Contact:

Re: Collision doesn't move with animated part

Post by Seb5a »

Oleg wrote: Sun Aug 07, 2022 9:33 pm no more ideas then.
Is there any original game model that has specific in-game animation on a part with collision? May be worth checking it via import/export..
I don't recall any car from GTA which is using animation or mechanics similar like that. I saw one car with similar mechanics but i think there is a script which is moving prop of that bed and bed is connected with a car.
User avatar
Oleg
Site Admin
Posts: 12236
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: Collision doesn't move with animated part

Post by Oleg »

what about forklift? does it have rising/lowering fork feature natively in game?
User avatar
Oleg
Site Admin
Posts: 12236
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: Collision doesn't move with animated part

Post by Oleg »

I would make another test too.
make your animation control passenger door (e.g. move it aside. play the animation in game, walk out of the vehicle and test whether door's collision has moved with the door object or not. It looks like animation does not cause associated collisions to be affected for some reason. May be it's technically hard to collide an object while animation still plays (e.g. back-response of physics to the animation playback is missing in game).
Seb5a
Posts: 13
Joined: Wed Aug 18, 2021 10:04 pm
Contact:

Re: Collision doesn't move with animated part

Post by Seb5a »

Oleg wrote: Mon Aug 08, 2022 2:24 am what about forklift? does it have rising/lowering fork feature natively in game?
Yes it has but forks are moving up and down or left and right probably if i will rotate axis but i need to move bed left and right and up and down.

On attachment is last state of animation to help visualize full movement
Attachments
1111.png
Seb5a
Posts: 13
Joined: Wed Aug 18, 2021 10:04 pm
Contact:

Re: Collision doesn't move with animated part

Post by Seb5a »

Oleg wrote: Mon Aug 08, 2022 2:26 am I would make another test too.
make your animation control passenger door (e.g. move it aside. play the animation in game, walk out of the vehicle and test whether door's collision has moved with the door object or not. It looks like animation does not cause associated collisions to be affected for some reason. May be it's technically hard to collide an object while animation still plays (e.g. back-response of physics to the animation playback is missing in game).
Checked that. Just made animation controls passenger door and collision was in base position of doors when i run animation.
User avatar
Oleg
Site Admin
Posts: 12236
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: Collision doesn't move with animated part

Post by Oleg »

I doubt "move only" vs "move and rotate" animation is the cause. I think something else is causing the issue. So, regarding the forklift - does it's fork collision move too when animation is played? is fork rising an animation actually or scripted thing? If there is an associated .ycd file for this animation, I guess you can make a quick test and put your vehicle instead of forklift (rename the bed as fork1/fork2 or whatever bone names are used) update and export animation. Just to test whether your vehicle will act as the forklift playing the animation for the bed. may be collisions will work this way? It will give some ideas to think on of it will perform properly.
Seb5a
Posts: 13
Joined: Wed Aug 18, 2021 10:04 pm
Contact:

Re: Collision doesn't move with animated part

Post by Seb5a »

Oleg wrote: Fri Aug 12, 2022 7:00 am I doubt "move only" vs "move and rotate" animation is the cause. I think something else is causing the issue. So, regarding the forklift - does it's fork collision move too when animation is played? is fork rising an animation actually or scripted thing? If there is an associated .ycd file for this animation, I guess you can make a quick test and put your vehicle instead of forklift (rename the bed as fork1/fork2 or whatever bone names are used) update and export animation. Just to test whether your vehicle will act as the forklift playing the animation for the bed. may be collisions will work this way? It will give some ideas to think on of it will perform properly.
As far as i know forklift is not using any animation, it's just scripted mechanics. Tried to search anything with fork in name but i just found normal animation for sitting, getting into vehicle etc.
I can use that mechanic but when i'll do that bed will just be able to move forward and backward and i need to rotate it a bit to allow vehicles to drive on the bed.
Seb5a
Posts: 13
Joined: Wed Aug 18, 2021 10:04 pm
Contact:

Re: Collision doesn't move with animated part

Post by Seb5a »

For now I' ve made a workaround for my problem. I just copied collision in last position in animation and made it as an extra. I'll try to write a script to enable that collision after animation will end. That will allow vehicles drive on bed and we can connect car with bed.
In that way everything should work somehow.
Attachments
111111.png
darcktretas
Posts: 12
Joined: Wed Sep 02, 2020 4:27 pm

Re: Collision doesn't move with animated part

Post by darcktretas »

unfortunately there's no way, I've tested it in several ways, the COL, the convertible cars, deactivate the col as soon as it completes the animation at the top. so i just found this method of disabling and enabling collision and not following.

but if you are a good Dev, there is a vehicle that has YCD that the collisions follow. But you have to know programming.

add my Discord Russo#1948. 3 years of zm
User avatar
Oleg
Site Admin
Posts: 12236
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: Collision doesn't move with animated part

Post by Oleg »

what model/ycd does this natively? or is this a modded file with some scripts? I remind I was watching a video on youtube with "utiltruck3" operating crane and it looks like it had a correct collision after expand/collapse animation of crane. Yet I guess it was all up to scripting.
darcktretas
Posts: 12
Joined: Wed Sep 02, 2020 4:27 pm

Re: Collision doesn't move with animated part

Post by darcktretas »

if you take stromberg and autere parts increase, the collision parts and the like, and export and use as Replace, the collision works without problems, more if you try to use another model other than oh stromberg, Gta 5 crash. besides if you try to do it like ADDON, "VEHICLE TYPE" by stromberg doesn't work, on other vehicles only on it, and you can't make another VA animation, which I play Crash too. :(



how do you make this node box appear, my zmodeler only appears in this GTA V function, when I change it to the COL layer, or in pixel.
Image
darcktretas
Posts: 12
Joined: Wed Sep 02, 2020 4:27 pm

Re: Collision doesn't move with animated part

Post by darcktretas »

I said a little confused, I mean ah node transformation options, I can't find this box :(
Post Reply