Commit Graph

135 Commits (e506341fdb9f3b6996d3c97de007f2b142fcddd3)

Author SHA1 Message Date
Robert Adams 1b021e0eaa BulletSim: add ID parameter to TaintedObject calls so logging will include LocalID of object which created the taint. 2013-09-20 21:03:14 +01:00
Robert Adams 1f740926a2 BulletSim: adjust avatar capsule height calculation to be closer to defined SL heights. Correct BSParam avatar height defaults to be what's in OpenSimDefaults.ini. 2013-09-20 21:03:06 +01:00
Robert Adams 7c3b71d294 BulletSim: add physical object initialized flag so updates and collisions
don't happen until the object is completely initialized.

This fixes the problem of doing a teleport while the simulator is running.
The destruction of the physical object while the engine is running means
that the physics parameter update would overwrite the new position of the
newly created avatar.
2013-08-14 14:49:22 -07:00
Robert Adams 0feb5da31e BulletSim: move the creation of the avatar movement actor creating to
taint time. Attempt to fix a problem of teleporting within the same
region where the remove and addition of the physical avatar occasionally
ends up with a non-moving avatar.
2013-08-13 21:06:24 -07:00
Robert Adams 2c31fe4614 BulletSim: add check in avatar stair step code to verify the collision
is not with a volume detect object.

This fixes a problem of avatars trying to step over a volume detect object
that they collide with. This appeared as the avatar popping up as it started
to step up but then continuing on since the object wasn't physically interacting.
2013-08-12 13:44:53 -07:00
Robert Adams 6410a25cef BulletSim: adjust avatar position when the avatar's size is changed.
This fixes the problem of avatars bouncing when logged in.
Added a little height to the avatar height fudges to eliminate a problem
of feet being in the ground a bit.
2013-08-08 13:55:17 -07:00
Robert Adams 5a7784a0e6 BulletSim: make density display and return value consistant with how
the simulator expects it (scaled to 100kg/m^3).
2013-07-30 07:22:43 -07:00
Robert Adams 1d65b0d802 BulletSim: add position resetting for stationary avatars so they don't
move around when standing on a stationary object.
Create proper linkage between BSCharacter and its actor by generating
a UpdatedProperties event the same way BSPrim does.
2013-07-18 19:09:55 -07:00
Robert Adams 70d24a654b BulletSim: rename position and orientation variables to remove the
inconsistant use of Raw* and _* conventions.
2013-07-07 05:46:24 -07:00
Robert Adams 23516717e4 BulletSim: a better version of llMoveToTarget that doesn't go crazy.
There is still some overshoot but mostly fixes Mantis 6693.
Fix bug where moveToTarget was active for non-physical objects
and while selected.
Fix bug where move target was not getting changed if the script
changed the target during a move.
2013-06-30 17:07:49 -07:00
Robert Adams 61cdf9390d BulletSim: fix problem with walking up stairs that are oriented
in certain directions. The problem was really that the avatar capsule
orientation was being set incorrectly.
2013-05-22 16:06:06 -07:00
Vegaslon b135f1d58a BulletSim: Fix for mantis 6487, also minor adjustment to fix flying while you are running.
Signed-off-by: Robert Adams <Robert.Adams@intel.com>
2013-05-14 08:48:40 -07:00
Robert Adams 15360cbb6b BulletSim: add adjustment for avatar capsule height scaling. Makes
avatar standing on ground view better and enables tuning.
2013-05-13 13:30:42 -07:00
Robert Adams 92ee288d66 BulletSim: remove trailing white space to make git happier. No functional changes. 2013-04-29 07:54:50 -07:00
Robert Adams ad1787770e BulletSim: rename variable 'PhysicsScene' to be either 'PhysScene' or 'm_physicsScene' to match coding conventions and reduce confusion. 2013-04-29 07:38:55 -07:00
Robert Adams e5582939fd BulletSim: massive refactor of shape classes. Removed shape specific code from BSShapeCollection. Using BSShape* classes to hold references to shape. Simplified shape dependency callbacks. Remove 'PreferredShape' methods and have each class specify shape type. Disable compound shape linkset for a later commit that will simplify linkset implementation. 2013-04-29 07:38:40 -07:00
Robert Adams a7a1b8b7e9 BulletSim: clean up actor code so routines use the same coding pattern.
Fix a few enabling problems.
2013-04-08 06:27:44 -07:00
Robert Adams fe16dc09da BulletSim: complete movement of physical object action code out of the
physical object and into actors for setForce, setTorque, hover, lock
axis and avatar move.
2013-04-08 06:27:43 -07:00
Robert Adams 84eb25da23 BulletSim: stop an avatar from moving if standing on a stationary
object. This will stop avatars from sliding down steep terrains
or objects while still allowing an avatar to be moved if standing
on a moving object.
2013-03-31 22:19:44 -07:00
Robert Adams 6a9630d2bd BulletSim: fix race condition when creating very large mega-regions.
The symptom was exceptions while creating physical terrain.
Reduce default terrain mesh magnification to 2 from 3 because the
higher resolution uses a lot of memory and doesn't solve the terrain
smoothness for vehicles.
Added comments here and there and improved some debugging log messages.
2013-03-28 10:59:18 -07:00
Robert Adams 1120bcf123 BulletSim: remove the ability for avatars to fly off the edge of
regions when there are no region neighbors.
Add some terrain location processing routines to support above.
2013-03-09 14:15:14 -08:00
Robert Adams 2b53f08386 BulletSim: tweeks to make avatar jump work better. 2013-02-25 21:58:00 -08:00
Robert Adams efb5da0aa6 BulletSim: add OutOfBounds logic and some position sanity checking
to eliminate some of the "cannot find terrain height" warning messages.
2013-02-21 08:52:11 -08:00
Robert Adams 0194a3d890 BulletSim: fix density since the simulator/viewer track density in a
funny unit that is 100 times real density (default 1000).
Fix avatar drifting slowly when stationary flying.
Fix for physical prims getting corrected for being under terrain when it was
just its geometric center that was below terrain.
Add PreUpdatePropertyAction allowing plugable modifiction of phys
parameters returned from Bullet.
Fix an exception setting GravityMultiplier on initialization.
Update DLLs and SOs for good measure (no functional change).
2013-02-12 15:52:10 -08:00
Robert Adams fb903ff490 BulletSim: More work on center-of-mass. Remove linksetinfo and rely on simulator to update info. 2013-02-12 15:52:08 -08:00
Robert Adams 222040f1ec BulletSim: Change BSCharacter to use new base Density and Friction
variables rather than own local varaibles.
2013-02-08 16:29:45 -08:00
Robert Adams 1b55a9d81e BulletSim: fix avatar bobbing or jiggling while stationary flying.
Various comments and debugging message mods.
2013-02-08 16:29:40 -08:00
Robert Adams 1b203601f4 BulletSim: include the linkage to the layered prim implementation. Separate layers for physical (vs simulator) location displacement and linksets. 2013-02-08 16:29:29 -08:00
Robert Adams ebb63b55aa BulletSim: add user setting of friction, density and restitution. 2013-02-07 17:13:27 -08:00
Robert Adams 75a05c16c5 BulletSim: fix crash caused when linksets were rebuilt. A problem added
when individual child pos/rot changes were implementated a week or so ago.
Remove some passing of inTaintTime flag when it was never false.
2013-01-31 15:56:10 -08:00
Robert Adams 371449db2f BulletSim: clean up TargetVelocity implementation by using the default defn in the PhysicsActor base class. 2013-01-31 15:55:53 -08:00
Robert Adams e9aff0a91d BulletSim: do not zero an avatar's standing velocity if it is standing
on a moving object.
Rearrange pre/post action subscription code to put more in locks.
Add meshmerizer params to BulletSimTestUtil scene creation (and fix line endings).
Rebuilt version of DLLs and SOs with cleaned up code and no profiling for sure.
2013-01-28 15:11:50 -08:00
Robert Adams 471c477863 BulletSim: allow changing position and rotation of a child of a linkset
without rebuilding the whole compound shape. Should make vehicles move
smoother.
2013-01-21 15:58:22 -08:00
Robert Adams 52b341e2e2 BulletSim: More aggressive as setting character velocity to zero
when should be standing.
Modify angular force routines to be the same pattern as linear force routines.
BulletSim vehicle turning is scaled like SL and is DIFFERENT THAN ODE!!
Fix some bugs in BSMotor dealing with the motor going to zero.
Add a bunch of parameters:  MaxLinearVelocity, MaxAngularVelocity,
MaxAddForceMagnitude, VehicleMaxLinearVelocity, VehicleMaxAngularVelocity,
and most of the values are defaulted to values that are larger
than in SL.
Use the new parameters in BSPrim, BSCharacter and BSDynamic.
2013-01-20 23:09:54 -08:00
Robert Adams 3c4868f613 BulletSim: fix problem of avatar sliding very slowly occasionally after stopping walking. Consolidate movement tests into the one prestep motion action 2013-01-20 23:09:54 -08:00
Robert Adams 3b0df52d10 BulletSim: modify motors to return correction rather than current value
to better use them for incremental updates.
Modify prim and character to use the new motors.
Simplify the vehicle linear movement code to just update the velocity
directly or the basic movement.
2013-01-20 23:09:53 -08:00
Robert Adams c6b6c94ccb BulletSim: reduce jitter in avatar velocity when walking or flying.
OpenSimulator is VERY sensitive to changes in avatar velocity and
will send an avatar update message when velocity changes more than
0.001m/s. This significantly reduces the number of avatar update messages by
smoothing the avatar velocity returned by Bullet.
2013-01-18 11:39:24 -08:00
Robert Adams 75f710f1e7 BulletSim: Add one function that all actors who act on the physical
can use to know if the object is currently active.
Code cleaning including use of Util.ClampV function.
2013-01-17 14:47:35 -08:00
Robert Adams 5d098d8f17 BulletSim: don't modify angular parameters when doing LIMIT_MOTOR_UP.
It was a dumb idea to try and do a nose over feature for jumping cars anyway.
Add better logging of native shape creation/reuse so can  tell the difference.
2013-01-15 21:08:46 -08:00
Robert Adams 61ff79587b BulletSim: add debugging messages to know when assets for physical
objects have been fetched.
Update TODO list with more work.
2013-01-15 21:08:46 -08:00
Robert Adams 4e1ca890c2 BulletSim: fix not moving physical objects below terrain to over terrain.
Add locking on register prestep action list preventing potential race conditions.
Little comment and formatting changes.
2013-01-14 15:46:46 -08:00
Robert Adams 93adc4cb66 BulletSim: Add IsSelected attribute to physical objects. Have vehicles check to see if physical before trying to step. Replace vehicle gravity application. Previously relying on Bullet to apply gravity but since vehicles over-ride the velocity calculation, gravity never had a chance to accelerate the body down. Added AddForceImpulse as well as AddForce for those who need to apply immediate velocity updates. Use the impulse to apply the linear motion. 2013-01-11 16:47:20 -08:00
Robert Adams 8452c0a870 BulletSim: add function to push avatar up when hitting stairs.
It looks like BulletSim and ODE rely on penetration correction to cause
the avatar to move up and thus allowing walking up stairs. Object
penetration was minimized for walking and flying (so one doesn't go
through walls) and this stopped stairs from working. This commit
introduces avatar movement code to check for collisions at the
feet while walking and attempts to raise the avatar for the steps.
Not yet perfect but movement is better.
2013-01-07 16:05:02 -08:00
Robert Adams 2e5222055f BulletSim: comments and removing small compile errors introduced in last commit. 2013-01-06 22:56:16 -08:00
Robert Adams 613f516007 BulletSim: convert avatar movement from a force to an impulse. Shouldn't
change functionality but removes an oddity in computing the force.
2013-01-04 17:06:50 -08:00
Robert Adams c2a7af18b6 BulletSim: nearly complete in conversion from BulletSimAPI to BSAPITemplate. Only initialization and debug fuctions left. 2012-12-31 19:57:23 -08:00
Robert Adams 9218748321 BulletSim: another round of conversion: dynamics world and collision object functions. 2012-12-31 19:57:22 -08:00
Robert Adams 48f718f39f BulletSim: first round of conversion from direct BulletSimAPI interfacing by BulletSim core to using the BulletSimAPITemplate. Physical object creation and destruction first. 2012-12-31 19:57:21 -08:00
Robert Adams 28a8949b9f BulletSim: remove check for small motor movement because, while it
did the right thing for stopping (speed reducing to zero), it prevented
movement from starting (speed increasing from zero). Will revisit
when the generalize PID motor is debugged.
2012-12-29 10:19:47 -08:00
Robert Adams 0538096fa3 BulletSim: an 'if' to suppress multiple setting of avatar orientation.
Looks like the viewer bombards the server with avatar orientation
information (we're talking several hundred a second) when the avatar
is being turned or when walking. This change just reduces the number
of 'set' calls into unmanaged code.
2012-12-29 08:32:57 -08:00