ConstantAngularSpeedCurve ?

Discuss any questions about BEPUphysics or problems encountered.
Norbo
Site Admin
Posts: 4929
Joined: Tue Jul 04, 2006 4:45 am

Re: ConstantAngularSpeedCurve ?

Post by Norbo »

While I don't want to release the project itself right now, here's some pictures to clarify exactly what it is. Blue is low stress, red is high stress. The stress propagates around dynamically. If a local stress limit is exceeded, a connection is severed.

The large box object falls from the sky; these are the impact stresses:
stress1.jpg
stress1.jpg (63.85 KiB) Viewed 11439 times
Blasting bits of it off by shooting at it:
stress2.jpg
stress2.jpg (73.51 KiB) Viewed 11439 times
Breaking it in half:
stress3.jpg
stress3.jpg (120.06 KiB) Viewed 11439 times
kavatortank
Posts: 91
Joined: Tue May 14, 2013 12:17 pm

Re: ConstantAngularSpeedCurve ?

Post by kavatortank »

Is amazing men, great job :)
And the box is one shape ? or many ?
Norbo
Site Admin
Posts: 4929
Joined: Tue Jul 04, 2006 4:45 am

Re: ConstantAngularSpeedCurve ?

Post by Norbo »

It starts as a single compound shape, but it is composed of many individual subshapes. As the subshape connections are broken by stress, the compound can split into two compounds (or hundreds, as the case may be). The subshapes don't have to be cubes, either; I also created a destructible spaceship game prototype which uses a similar system for arbitrarily shaped ship pieces.
kavatortank
Posts: 91
Joined: Tue May 14, 2013 12:17 pm

Re: ConstantAngularSpeedCurve ?

Post by kavatortank »

And you can show me pictures ?
Norbo
Site Admin
Posts: 4929
Joined: Tue Jul 04, 2006 4:45 am

Re: ConstantAngularSpeedCurve ?

Post by Norbo »

I suppose so- these pictures are a bit harder to parse without seeing them in motion thanks to all the colors, but they'll have to do.

Smashed through a bunch of space ships with a big ship, bringing them down into a little planet's gravity field:
ship1.jpg
ship1.jpg (367.03 KiB) Viewed 11434 times
The moment following impact of some big ships, with pieces flying off:
ship2.jpg
ship2.jpg (204.74 KiB) Viewed 11434 times
Firing the big ship's main cannon at some little ships. The most recent impact was on the wing, causing the ship to spin apart. Debris from previously destroyed ships is floating around in the background:
ship3.png
ship3.png (115.19 KiB) Viewed 11434 times
kavatortank
Posts: 91
Joined: Tue May 14, 2013 12:17 pm

Re: ConstantAngularSpeedCurve ?

Post by kavatortank »

Great, I'm waiting for it
kavatortank
Posts: 91
Joined: Tue May 14, 2013 12:17 pm

Re: ConstantAngularSpeedCurve ?

Post by kavatortank »

I have a new question.
With bepuphysics engine, can I know if a object is in view from an other object ?
For example, if I have 2 boxes and 1 heightmap, I want to know if my camera ( wich target the first box ) see the second box.
Norbo
Site Admin
Posts: 4929
Joined: Tue Jul 04, 2006 4:45 am

Re: ConstantAngularSpeedCurve ?

Post by Norbo »

Casting a ray with Space.RayCast from the camera position to the center of the box would be a decent approximation. If the ray hits anything before it hits the box, the box can be considered occluded.

This is only an approximation, though- consider what might happen if you could actually see the corner of a box, but the center was occluded. These sorts of issues could be handled by testing multiple rays scattered across the box.
kavatortank
Posts: 91
Joined: Tue May 14, 2013 12:17 pm

Re: ConstantAngularSpeedCurve ?

Post by kavatortank »

Okay,
I want to add each part of the tank separate.
But when I add the vehicle.Body in the space, after each wheels, I have no wheels, or wheels are not connected to the vehicle I think.
Why ?
EDIT :
I think is because, if I don't add the vehicle to the space, wheels are not updated, aren't they ?
Norbo
Site Admin
Posts: 4929
Joined: Tue Jul 04, 2006 4:45 am

Re: ConstantAngularSpeedCurve ?

Post by Norbo »

The Vehicle object itself should be added to the space. Doing so adds the Vehicle's body to the space; adding only the body will cause things to break.
kavatortank
Posts: 91
Joined: Tue May 14, 2013 12:17 pm

Re: ConstantAngularSpeedCurve ?

Post by kavatortank »

Yeah, but for my graphical loop, I use a system of actors.
So each part of the vehicle must be an actor, so I have to add parts separatly.
I can't do it ?

EDIT :

Problem solve, but it's really bad for my actors system.
Last edited by kavatortank on Thu May 30, 2013 12:13 am, edited 1 time in total.
Norbo
Site Admin
Posts: 4929
Joined: Tue Jul 04, 2006 4:45 am

Re: ConstantAngularSpeedCurve ?

Post by Norbo »

Correct; the Vehicle should be treated as one atomic object, not a collection of separate wheels and a body.
kavatortank
Posts: 91
Joined: Tue May 14, 2013 12:17 pm

Re: ConstantAngularSpeedCurve ?

Post by kavatortank »

When a kapow is fired to the tank, the reaction is strange.
When I fire on the turret, the turret do really bad mouvement, how I can solve it ?

EDIT :

I have a second question :
How I can do a tank path folling, because is not like a simple entity, isn't it ?
Norbo
Site Admin
Posts: 4929
Joined: Tue Jul 04, 2006 4:45 am

Re: ConstantAngularSpeedCurve ?

Post by Norbo »

When I fire on the turret, the turret do really bad mouvement, how I can solve it ?
If the projectile is being created inside the turret or something along those lines, it will collide with it and impart a bunch of force. That could cause problems. If this is what is happening, position the projectile further out or set up the collision rules such that the turret doesn't collide with the projectile.
How I can do a tank path folling, because is not like a simple entity, isn't it ?
Path following is indeed best for an object following a very specific path. You could move the vehicle's body entity with one, but it won't behave like a tank anymore. It'll just get shoved around.

A better approach is to steer the vehicle normally in the desired directions.
kavatortank
Posts: 91
Joined: Tue May 14, 2013 12:17 pm

Re: ConstantAngularSpeedCurve ?

Post by kavatortank »

So the better solution, is to have a normal driving ?
For the pathfollowing I have only points, so I want to if the tank has to rotate on the left, or on the right, or go forward or backward.
Bepuphysics give helper for quaternion comparaison ?
Post Reply