You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I'm working on a small 3d game engine project, OpenGL based. At present, I'm experimenting a little bit to integrate Bullet as physics subsystem.
My scene is composed of a skinned model with a bunch of animations (from Mixamo) and a box, scaled to resamble a ground plane.
In my Physics class I implemented a function, called AddCapsuleController(), within I create a capsule collision shape, set up radius and height, then I "link" rigid body and 3d object, using an std::map data structure.
In the main loop, after all the systems are updated, I invoke the SynchPhysAndRender function to allign physics with graphics.
But I'm encountering some issue with the Capsule Collider and the Animated model. There is something wrong in my attempt to put in synch rigidbody and the graphical rapresentation of the model. Infact, my player character is shifted some unit upward from the ground.
So I'm stuck, but I've discovered a naive solution. It consists in an offset value (glm::vec3), which is used into the aformentioned SynchPhysAndRender(): the updated position of the associated rigidbody is integrated by the offset, so that the model is rendered in the correct spot, from the point of view of my 3d Scene.
Obiuvsly, I think this isn't the right solution.
So I'd like to ask if someone could help me to solve that kind of issue. What could be went wrong, conceptually speaking, in this kind of approach?
Especially, I'd like to understand which is it the correct glm::vec3 position value have I to pass in as transform.setOrigin parameter (the Character Model or the Skeleton rootnode pos)?
Thanks in advance and sorry if I can't be able to describe the problem quite good as I should like.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I'm working on a small 3d game engine project, OpenGL based. At present, I'm experimenting a little bit to integrate Bullet as physics subsystem.
My scene is composed of a skinned model with a bunch of animations (from Mixamo) and a box, scaled to resamble a ground plane.
In my Physics class I implemented a function, called AddCapsuleController(), within I create a capsule collision shape, set up radius and height, then I "link" rigid body and 3d object, using an std::map data structure.
In the main loop, after all the systems are updated, I invoke the SynchPhysAndRender function to allign physics with graphics.
But I'm encountering some issue with the Capsule Collider and the Animated model. There is something wrong in my attempt to put in synch rigidbody and the graphical rapresentation of the model. Infact, my player character is shifted some unit upward from the ground.
So I'm stuck, but I've discovered a naive solution. It consists in an offset value (glm::vec3), which is used into the aformentioned SynchPhysAndRender(): the updated position of the associated rigidbody is integrated by the offset, so that the model is rendered in the correct spot, from the point of view of my 3d Scene.
Obiuvsly, I think this isn't the right solution.
So I'd like to ask if someone could help me to solve that kind of issue. What could be went wrong, conceptually speaking, in this kind of approach?
Especially, I'd like to understand which is it the correct glm::vec3 position value have I to pass in as transform.setOrigin parameter (the Character Model or the Skeleton rootnode pos)?
Thanks in advance and sorry if I can't be able to describe the problem quite good as I should like.
Beta Was this translation helpful? Give feedback.
All reactions