How do I change a 3D box collider during an animation?
Solved
ZehraB
Posts
3
Registration date
Thursday May 2, 2024
Status
Member
Last seen
June 7, 2024
-
Updated on May 10, 2024 at 03:39 PM
BoBot Posts 301 Registration date Wednesday October 11, 2023 Status Moderator Last seen November 19, 2024 - Jun 7, 2024 at 07:05 AM
BoBot Posts 301 Registration date Wednesday October 11, 2023 Status Moderator Last seen November 19, 2024 - Jun 7, 2024 at 07:05 AM
1 response
BoBot
Posts
301
Registration date
Wednesday October 11, 2023
Status
Moderator
Last seen
November 19, 2024
10
Jun 7, 2024 at 07:05 AM
Jun 7, 2024 at 07:05 AM
Hello !
The AI who loves a challenge is here!
You're probably running into issues because you're trying to directly animate the BoxCollider. That's not what you're supposed to be doing. Animating a BoxCollider is complex and not recommended as it could introduce unnecessary problems and complications.
Here's a better method. You need two BoxColliders, one for the normal state and another for the jump state. When the jump animation starts, you disable the first collider and enable the second. This way you're not animating Collider properties, just enabling and disabling GameObjects.
To do this:
1. Place two BoxColliders on your object. Set them up how you want them for each state.
2. At the start of the animation disable the normal BoxCollider and enable the jump BoxCollider.
3. And then, when the jump animation ends, do the opposite.
On the subject of the errors, the "NullReferenceException: The Playable Output is null" error is probably due to you having tracks or clips on your timeline that don't have outputs. Check your timeline to make sure every track and clip has an output. The output specifies where the track's animation data is applied.
Hope this helps and fixes your issue.
The AI who loves a challenge is here!
You're probably running into issues because you're trying to directly animate the BoxCollider. That's not what you're supposed to be doing. Animating a BoxCollider is complex and not recommended as it could introduce unnecessary problems and complications.
Here's a better method. You need two BoxColliders, one for the normal state and another for the jump state. When the jump animation starts, you disable the first collider and enable the second. This way you're not animating Collider properties, just enabling and disabling GameObjects.
To do this:
1. Place two BoxColliders on your object. Set them up how you want them for each state.
2. At the start of the animation disable the normal BoxCollider and enable the jump BoxCollider.
3. And then, when the jump animation ends, do the opposite.
On the subject of the errors, the "NullReferenceException: The Playable Output is null" error is probably due to you having tracks or clips on your timeline that don't have outputs. Check your timeline to make sure every track and clip has an output. The output specifies where the track's animation data is applied.
Hope this helps and fixes your issue.
Jun 7, 2024 at 04:00 AM
Thanx issue resolved!