Im working on a VR gun engine for ATHENA, but I have wondered for 2 years now, how do I mix physics with cframes? I’ve seen it done by ARES so far, but I havent found anything on it anywhere.
This is what I am referring to:
Im working on a VR gun engine for ATHENA, but I have wondered for 2 years now, how do I mix physics with cframes? I’ve seen it done by ARES so far, but I havent found anything on it anywhere.
This is what I am referring to:
What do you exactly want to do? Gun movement or what? Please specify your point.
Im trying to keep the gun from phasing through the wall by adding physics to it. Im not really sure how to go about it since Im using CFrames and Quaternions. I would just use align positions and orientations, but the position would be delayed.
I would recomend you to use AlignPosition and AlignOrientation, If you make them on client they won’t be delayed. CFrames are used do describe object’s orientation and position and Quaternions to describe object’s orientation. In my opinion you shouldn’t use CFrames nor Quatrenions to implement gun’s movement, you’ll spend too much time on making proper physics in fact roblox already did this job by adding constraints.
Cframes and quaternions are best for responsiveness. Align positions and orientations have a max responsiveness, which is why I wont usr them.
Well, I think you can use BodyPosition then, I think it doesn’t have any limits.
This is what the new AnimationConstraint instance is for. It’s like a Motor6D, but it has a simulated mode where the animation transform sets the goal (like AlignOrientation) rather than behaving like a weld at simulation time.
[Studio Beta] Avatar Joint Upgrade: Enabling Physically-Simulated Characters
I would love to use the AnimationConstraint, but it has a delay:
https://gyazo.com/e577847e7d32f2fb2fc6110e454b6cee
I need to be able to have it almost instant so that the hands don’t have a big delay when moving.
The animation constraints have an isKinematic property, for switching them between behaving like a Motor6D (no delay), and being simulated. Most of the time, you will want them to be not simulated, so there is no delay. Only toggle them when their bounds are actually colliding with something, during which times, the lag will be barely noticable, and it’s just the price you have to pay for having it updated during the physics simulation step rather than perfecting in sync with RenderStepped.
show us your progress-----------