Re: Facing manipulation
Posted: Fri Jun 14, 2013 11:16 pm
Okay, I will try this later.
How I can catch the global bounding box of the vehicle ?
How I can catch the global bounding box of the vehicle ?
Former forum of queegs; use github discussions now!
https://forum.bepuentertainment.com/
If you want to support that kind of replay, the easiest way is to store a running window of 'keyframes' representing the latest motion and state of relevant objects. The replay would just then be a simple nonsimulated animation working through the frames.kavatortank wrote:1 - How has BepuPhysics grace, I can do a replay as a killcam in the video war games like callofduty?
If you want to do slow motion while using the parameterless Space.Update(), set the Space.TimeStepSettings.TimeStepDuration to value appropriate for the slow-mo for the duration of the effect (e.g. if you want to progress have half speed and you're using the default of 1/60f, set it to 1/120f). Since the parameterless Space.Update() takes a single time step of length Space.TimeStepSettings.TimeStepDuration, the simulation will advance forward more slowly.kavatortank wrote:2 - How can I réalister BepuPhysics thanks to a kind of slow motion?
I don't know how to narrow my question because I just don't understand your answers.Norbo wrote:Could you narrow down the question?
When I'm helping someone, it is very valuable to know what they actually need help with so I don't spend extra time blabbering about unhelpful things.I don't know how to narrow my question because I just don't understand your answers.
I assumed this meant you wanted to replay a portion of previous gameplay. To do this, create an animation representing the previous motion, and then play it on demand. It's just like a regular character animation- it has a series of frames, the current time is used to find a frame to use (or interpolate between adjacent frames for smoother motion), and as time progresses the animation progresses.1 - How has BepuPhysics grace, I can do a replay as a killcam in the video war games like callofduty?
I assumed this meant you wanted to make the physics simulation proceed in slow motion. The way to do this depends on how your game updates BEPUphysics. There are two Space.Update functions; one is parameterless, the other takes a float representing the time since the last frame.2 - How can I réalister BepuPhysics thanks to a kind of slow motion?
Collision rules would be appropriate. Defining a rule of NoSolver where appropriate would stop collision response, but allow collision detection.I want to know how I can disable collision response with all objet ? For example, I have a box and I want to know when this box is collided but I don't want any collision response.
I test that :Norbo wrote:Collision rules would be appropriate. Defining a rule of NoSolver where appropriate would stop collision response, but allow collision detection.I want to know how I can disable collision response with all objet ? For example, I have a box and I want to know when this box is collided but I don't want any collision response.
Code: Select all
kapow.CollisionInformation.Events.ContactCreated += new BEPUphysics.BroadPhaseEntries.Events.ContactCreatedEventHandler<BEPUphysics.BroadPhaseEntries.MobileCollidables.EntityCollidable>(Events_ContactCreated);
kapow.CollisionInformation.CollisionRules.Personal = CollisionRule.NoSolver;
Code: Select all
throw new ArgumentException("Cannot remove that member from this DeactivationManager; it belongs to a different or no manager.");
Code: Select all
public override Entities.Entity EntityB
{
get { return compoundInfoB.entity; }
}
Code: Select all
public override Entities.Entity EntityB
{
get { return convexInfo.entity; }
}
Code: Select all
void Events_ContactCreated(BEPUphysics.BroadPhaseEntries.MobileCollidables.EntityCollidable sender, Collidable other, CollidablePairHandler pair, ContactData contact)
{
if (sender.Entity.Space == Space)
{
string str = (string)other.Tag;
if (pair.EntityB != null && (string)pair.EntityB.Tag == "missile")
{
Space.Remove(Vehicle);
Space.Remove(turret);
Space.Remove(turret2);
}
}
Code: Select all
void Events_ContactCreated(BEPUphysics.BroadPhaseEntries.MobileCollidables.EntityCollidable sender, Collidable other, CollidablePairHandler pair, ContactData contact)
{
if (sender.Entity.Space == Space && Vehicle.Body.Space != null && turret.Space != null && turret2.Space != null)
{
string str = (string)other.Tag;
if (pair.EntityB != null && (string)pair.EntityB.Tag == "missile")
{
Space.Remove(Vehicle);
Space.Remove(turret);
Space.Remove(turret2);
}
}