Page 5 of 6
Re: ConstantAngularSpeedCurve ?
Posted: Wed May 29, 2013 4:56 am
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 (63.85 KiB) Viewed 11430 times
Blasting bits of it off by shooting at it:

- stress2.jpg (73.51 KiB) Viewed 11430 times
Breaking it in half:

- stress3.jpg (120.06 KiB) Viewed 11430 times
Re: ConstantAngularSpeedCurve ?
Posted: Wed May 29, 2013 9:09 am
by kavatortank
Is amazing men, great job

And the box is one shape ? or many ?
Re: ConstantAngularSpeedCurve ?
Posted: Wed May 29, 2013 7:02 pm
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.
Re: ConstantAngularSpeedCurve ?
Posted: Wed May 29, 2013 7:22 pm
by kavatortank
And you can show me pictures ?
Re: ConstantAngularSpeedCurve ?
Posted: Wed May 29, 2013 8:02 pm
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 (367.03 KiB) Viewed 11425 times
The moment following impact of some big ships, with pieces flying off:

- ship2.jpg (204.74 KiB) Viewed 11425 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 (115.19 KiB) Viewed 11425 times
Re: ConstantAngularSpeedCurve ?
Posted: Wed May 29, 2013 8:15 pm
by kavatortank
Great, I'm waiting for it
Re: ConstantAngularSpeedCurve ?
Posted: Wed May 29, 2013 9:38 pm
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.
Re: ConstantAngularSpeedCurve ?
Posted: Wed May 29, 2013 10:27 pm
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.
Re: ConstantAngularSpeedCurve ?
Posted: Wed May 29, 2013 11:46 pm
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 ?
Re: ConstantAngularSpeedCurve ?
Posted: Thu May 30, 2013 12:00 am
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.
Re: ConstantAngularSpeedCurve ?
Posted: Thu May 30, 2013 12:01 am
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.
Re: ConstantAngularSpeedCurve ?
Posted: Thu May 30, 2013 12:13 am
by Norbo
Correct; the Vehicle should be treated as one atomic object, not a collection of separate wheels and a body.
Re: ConstantAngularSpeedCurve ?
Posted: Thu May 30, 2013 4:52 pm
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 ?
Re: ConstantAngularSpeedCurve ?
Posted: Fri May 31, 2013 4:33 am
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.
Re: ConstantAngularSpeedCurve ?
Posted: Fri May 31, 2013 7:33 am
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 ?