Anthony J. Thibault
97bcc54360
CharacterController: separate target velocity from parent velocity.
...
Also, disable damping on the rigidBody used by the CharacterController.
2016-02-08 16:01:36 -08:00
Anthony J. Thibault
f13e31c7fc
CharacterController: removed unnecessary code.
2016-02-05 10:53:58 -08:00
Anthony J. Thibault
8ca8550f26
MyAvatar: Standing Takeoff and In-Air Animations
...
Now there are two sets of of jump takeoff and in-air animations.
* Run - Used when the character jumps or falls with a small forward velocity.
* Standing - Used when the character jumps or falls in-place or backward.
CharacterController
* increased takeoff duration to 250 ms
* increased takeoff to fly duration to 1100 ms
* added standing jump and in-air animations
* added 250 milisecond delay between ground and hover, to prevent going into hover when walking over cracks.
* take-off to in-air transitions now use the new snapshotPrev interp type for a smoother tweening.
2016-02-04 17:56:07 -08:00
Anthony J. Thibault
fff603e4e2
Removed comment
2016-02-03 10:21:27 -08:00
Anthony J. Thibault
6cc3b2b47f
Fixed unused variable warnings on OSX and Linux
2016-02-02 15:04:28 -08:00
Anthony J. Thibault
c4e1509aa2
CharacterController: better debug support of internal state machine
...
Head is no longer visible when flying fast, in first-person HMD mode.
2016-02-02 11:26:18 -08:00
Anthony J. Thibault
8b5cf3e49a
CharacterController: refined state machine.
2016-02-02 11:26:17 -08:00
Anthony J. Thibault
47f3ce3786
CharacterController jump is more reliable.
2016-02-02 11:26:16 -08:00
Anthony J. Thibault
2936811484
Added takeoff animation, WIP
...
Character controller still has some jump/in-air bugs.
2016-02-02 11:26:15 -08:00
Anthony J. Thibault
61c55ebf6c
Updated character controller with a state enumeration
...
Also, adjusted checkForSupport logic such that very slanted walls are not considered support.
2016-02-02 11:26:15 -08:00
Anthony J. Thibault
c771c925c8
MyAvatar: copy body velocity + hmd follow velocity onto avatar
...
This was inadvertently removed in a previous PR.
https://github.com/highfidelity/hifi/pull/6895
Also, renamed Velocity stat to Speed.
2016-01-27 11:20:32 -08:00
Anthony J. Thibault
bc9621baab
CharacterController: Improve ground support detection
...
In addition to the existing line probe ground check, also check if the bottom sphere of the capsule is contact with any geometry before going into hover mode.
This should prevent going into the fly animation when standing or walking on collision shapes with small gaps between elements.
2016-01-25 21:54:35 -08:00
Anthony J. Thibault
61b760038a
Address feedback from code review
2016-01-22 11:54:28 -08:00
Anthony J. Thibault
ca8a832818
CharacterController: added hard limit to follow displacement
...
To prevent tunneling when the rigid body cannot reach it's target due to being blocked by a wall or some other obstacle.
Also, added unit tests for physics/BulletUtil rotateVector and clampLength functions.
2016-01-21 17:27:45 -08:00
Anthony J. Thibault
a91c181a89
MyAvatar: Recenter when the head turns away from the hips
...
Compute HMD facing moving average.
When the moving average diverges from the hips by more then 45 degrees, recenter the body.
Also, the follow code has been changed, instead of a follow velocity being passed to the CharacterController
a desired target is passed. The CharacterController homes toward it's target based on the time remaining.
Any follow deltas applied to move the avatar's position closer to it's target is stored and re-applied
to the bodySensorMatrix. This centralizes the moving/homing code to one place, the CharacterContoller.
A new FollowHelper class was also introduced, it groups together the data and logic necessary to perform the
re-centering/follow procedure. This "hopefully" makes it easier to maintain.
2016-01-21 16:38:42 -08:00
Andrew Meadows
2288d96868
fix CharacterController ray cast for floor
2016-01-12 15:11:27 -08:00
Andrew Meadows
e1ba4ff0a8
add CollisionMask entity property
2016-01-12 15:08:52 -08:00
Seth Alves
d3c57821c0
call a method on actions before each physics simulation step. use this to attempt to dejitter held objects
2015-12-16 14:00:04 -08:00
Andrew Meadows
9e99bff250
fix avatar upward drift after shape change
2015-12-09 18:09:55 -08:00
Andrew Meadows
8c109fd623
move raw bullet code from interface to physics lib
2015-12-08 17:21:43 -08:00
Brad Hefta-Gaub
a149a2dd60
fix some warnings
2015-10-30 00:19:14 -07:00
Andrew Meadows
afec2a9771
fix whitespace
2015-10-28 09:42:55 -07:00
Andrew Meadows
a1f1e50431
split CharacterController btw phys and interface
2015-10-27 13:15:38 -07:00
Andrew Meadows
2ccc25e380
remove old kinematic CharacterController
2015-04-07 16:29:52 -07:00
Andrew Meadows
27d6d9f720
add Bullet profiling hooks for physics simulation
2015-04-02 15:20:16 -07:00
Andrew Meadows
f4f219ca36
tweak jump velocity and hover transition
2015-04-02 09:03:33 -07:00
Andrew Meadows
f804b2311d
remove hover-friendly behavior
2015-04-02 08:40:47 -07:00
Andrew Meadows
b37384d759
exit hover now not quite automatic when over floor
...
remove MyAvatar::jump() method for more general API
2015-04-01 15:13:27 -07:00
Andrew Meadows
0249b8c9c5
fix backwards comparison logic
2015-04-01 13:56:05 -07:00
Philip Rosedale
8114fdd1e2
move button locations, names some constants in avatar controller
2015-03-31 21:51:50 -07:00
Philip Rosedale
9635c6d248
Merge branch 'master' of https://github.com/worklist/hifi
2015-03-31 16:29:55 -07:00
Philip Rosedale
b7f0be761c
gun buildings fall on creation, dice stops correctly
2015-03-31 16:27:09 -07:00
Andrew Meadows
9739d68370
fix typo that broke avatar motion
2015-03-31 13:20:06 -07:00
andrew
fdfb8bd1b4
fix intermittent crash on windows during login
2015-03-31 09:26:33 -07:00
Andrew Meadows
9b13f186e3
remove character from PhysicsEngine on shutdown
2015-03-30 15:51:58 -07:00
Andrew Meadows
2404fb126f
Merge pull request #4527 from sethalves/valgrind
...
Valgrind told me to do it
2015-03-30 11:56:17 -07:00
Andrew Meadows
da9ceac9ae
fix crash for bad avatar body on login
2015-03-30 11:06:02 -07:00
Seth Alves
1e166eef0f
valgrind says _ghostObject is used before it's initialized
2015-03-28 17:12:55 -07:00
Andrew Meadows
bee8c0e237
"hover" if the "jump" key is held down long enough
2015-03-27 13:56:03 -07:00
Andrew Meadows
be5fdbf217
enable avatar collisions by default
...
also remove old gravity features
2015-03-27 13:36:20 -07:00
Andrew Meadows
821ac605f5
smoother motion on steps
...
faster motion when "flying"
cleanup of MyAvatar::updatePosition()
2015-03-26 19:48:52 -07:00
Andrew Meadows
8a951e0dd3
minor cleanup
2015-03-26 15:16:57 -07:00
Andrew Meadows
0ef4022e94
tweak gravity and step heights of controller
2015-03-26 15:14:46 -07:00
Andrew Meadows
429a258df0
enable hover when far above floor
2015-03-25 14:38:27 -07:00
Andrew Meadows
2440c47648
remove extra whitespace
2015-03-25 11:06:19 -07:00
Andrew Meadows
2128f21308
only set ADD bit with UPDATE_SHAPE when enabled
2015-03-25 11:02:48 -07:00
Andrew Meadows
674b2c97a2
added comments to zlib license
2015-03-25 08:53:33 -07:00
Andrew Meadows
430158c109
updateShapeIfNecessary() is a more correct name
2015-03-24 23:35:09 -07:00
Andrew Meadows
d497620976
avatar can jump with E key when walking
2015-03-24 23:05:46 -07:00
Andrew Meadows
44eca08fa4
PhysicsEngine doesn't need AvatarData
...
MyAvatar now owns its CharacterController
fix for bug of phantom collision obj when avatar's physics are disabled
2015-03-24 17:38:35 -07:00