Solved

Switching between PHYS_RigidBody to Phys_None and back again problem UDK

Posted on 2011-03-05
3
857 Views
Last Modified: 2012-05-11
I get a weird anomaly when I try setting to phys_none, first the angle of the object changes, and when I switch back to phys_rigidbody the object goes crazy trying to set it's self back to the angle and location it was at before I switched to none.
0
Comment
Question by:codevomit
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 12

Expert Comment

by:satsumo
ID: 35045013
Describe the 'going crazy', how does the object behave?  Is the object intersecting anything when you set it back to rigid body?

I don't know about UDK itself, but I've done lots of work with rigid body physics.  I have a few ideas what this might be.  However there isn't enough information in your question for anything but speculation.

This is could be interpolation or energy conservation.  Physical bodies have kinetic energy, which pushes them in some direction and spins them.  When you make the object none physical, its stops moving with that energy, but the energy is not necessarily removed from the object.

Some physics system work with interpolation.  Physical motion happens continuously not 50 times per second like rendering.  The system might store where the object is and where its going to be in 0.5 seconds (unless something disturbs it), then interpolate closer to that point on each frame.

Then again, it may simply be that UDK keeps separate states for physical and non-physical objects.  Perhaps there is some code that tries to match them up when you switch state.  I guess the intention is that the object would move physically, then be frozen in place by making it non-physical.  So that when you make it physical again, it carries on from where it left off, rather than having moved somewhere else.
0
 
LVL 1

Accepted Solution

by:
codevomit earned 0 total points
ID: 35117062
Having  bUpdateKinematicBonesFromAnimation=true in the KAssetSkelMeshComponent was what was causing it to it to try and return back to it's original position after I switch the object's state back to rigidbody.
0
 
LVL 1

Author Closing Comment

by:codevomit
ID: 35154502
I found my problem
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As game developers, we quickly learn that Artificial Intelligence (AI) doesn’t need to be so tough.  To reference Space Ghost: “Moltar, I have a giant brain that is able to reduce any complex machine into a simple yes or no answer. (http://www.youtu…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question