Commit graph

65 commits

Author SHA1 Message Date
Seth Alves
cbfde2032c fix bug which caused observers of a parenting grab to not see the entity in the grabber's hand 2016-03-17 17:09:32 -07:00
Seth Alves
e8a03b725f try again on queryAACube 2016-03-14 13:03:27 -07:00
Seth Alves
01659cf93b try, try again 2016-03-11 16:21:20 -08:00
Seth Alves
5f05d576cc move checkAndAdjustQueryAACube into SpatiallyNestable 2016-03-11 15:55:42 -08:00
Philip Rosedale
3eabf0d451 Merge pull request #7209 from sethalves/auto-unhook-stuck-to-hand
when trigger is squeezed, check for things stuck to hand and unhook them
2016-02-29 12:59:02 -08:00
Seth Alves
bb9d1556c6 when breaking a parenting loop, make an effort to keep the object near where it was when the loop was created 2016-02-29 11:07:02 -08:00
Seth Alves
5bf8670bc2 fix SpatiallyNestable::getChildren 2016-02-28 12:16:41 -08:00
Seth Alves
c0c5084149 handle parenting loops 2016-02-26 14:05:02 -08:00
Seth Alves
3fe01ccf10 cleanups 2016-02-10 18:32:05 -08:00
Seth Alves
3f922240d0 clean up handling of success flag and some debugging prints 2016-02-10 16:42:13 -08:00
Anthony J. Thibault
727e289ecd SpatiallyNestable: bug fixes for kinematic entities
* Kinematic entities were being simulated with position in the local frame but velocity in the global frame.
* Also, because getVelocity() was returning non-zero values when the parent was moving, kinematic objects were being simulated even if they should have been at rest.
* Bug fix for calculating velocity direction was incorrect, if the parent frame was rotated.
2016-02-09 17:58:54 -08:00
Anthony J. Thibault
2b10fea006 SpatiallyNestable: warn on failure. 2016-02-09 14:03:39 -08:00
Anthony J. Thibault
6a82594a4f SpatiallyNestable: more locks, less contention 2016-02-08 20:09:32 -08:00
Anthony J. Thibault
072172b1a2 SpatiallyNestable: now with velocity support!
Moved velocity and angularVelocity into the SpatiallyNestable base class.

Entity velocity and angularVelocity properties are now relative to their parent, similar to the way position and orientation work for entities.

MyAvatar rig animations now use SpatiallyNestable to convert velocity into local frame to drive the animation state machine.
2016-02-08 19:43:23 -08:00
Seth Alves
2633cb1f27 rename NaN functions for vec3 and quat 2016-01-22 11:54:24 -08:00
Seth Alves
a9cf836cb0 added isVec3NaN and isQuatNaN functions 2016-01-22 11:13:55 -08:00
Seth Alves
6b15beb88a use isNaN rather than a self-comparison 2016-01-22 10:36:21 -08:00
Seth Alves
451464cb47 check values in location updates for NaN before using them 2016-01-22 09:41:46 -08:00
Seth Alves
09dd3e2a56 merge from upstream, respond to code review 2016-01-19 14:38:22 -08:00
Seth Alves
3b3720781f fix a place where parent's scale wasn't properly squashed 2016-01-18 11:15:53 -08:00
Seth Alves
31bed934fe fix bug caused by accidental reuse of variable -- queryAABox was often of size 1 rather than the correct dimensions 2016-01-07 16:27:14 -08:00
Seth Alves
96f506a98d code review 2016-01-05 07:27:27 -08:00
Seth Alves
63293d5838 remove commented code 2016-01-03 08:07:31 -08:00
Seth Alves
c84fa5f821 cleanups 2015-12-21 14:45:18 -08:00
Seth Alves
00e0b26f05 fix thinko and whitespace 2015-12-21 11:15:54 -08:00
Seth Alves
3c2dac5cf8 parent query-cube should encompass child query-cube not child max-aa-cube 2015-12-21 11:05:07 -08:00
Seth Alves
abaa329984 parents AACube should encompass all children's 2015-12-21 10:55:07 -08:00
Seth Alves
3782c21b45 when a parent moves, check children vs their queryAACubes 2015-12-18 16:06:51 -08:00
Seth Alves
69bba4a182 queryAABox wasn't centered on object 2015-12-18 14:46:24 -08:00
Seth Alves
688448fe41 more queryAABox experimenting 2015-12-17 16:18:41 -08:00
Seth Alves
2dd2a49141 a non-set queryAACube is one with no volume 2015-12-17 15:02:07 -08:00
Seth Alves
473212e5b7 try to be more coherent about queryAABox meaning 2015-12-17 14:29:41 -08:00
Seth Alves
7693058e39 clear _queryAACubeSet flag in locationChanged 2015-12-17 10:49:24 -08:00
Seth Alves
1c0231c416 quiet some debugging prints 2015-12-15 16:46:16 -08:00
Seth Alves
b9f0a87a25 if a server can't get the queryAACube but received one from an interface, use the received one 2015-12-15 14:43:14 -08:00
Seth Alves
c74f8bca49 location getters also return a success boolean so that callers can know if the value they are receiving is bad due to lack of information about an object's parent 2015-12-14 09:13:36 -08:00
Seth Alves
24fb43e8cd first steps toward a puffed-out query-box for child entities 2015-12-12 12:33:14 -08:00
Seth Alves
6c033d9603 call locationChanged when receiving changing avatar joints over the network. RenderableModelEntityItem uses locationChanged to relay updates to _model 2015-12-11 11:35:42 -08:00
Atlante45
6f29d9e7b8 Use strongly typed enum instead of nested alias 2015-12-10 11:10:09 -08:00
Seth Alves
f99812a903 adjust method names to fit convention 2015-12-07 14:31:08 -08:00
Seth Alves
96e9580473 change some more parameters back to being pass-by-reference, where it's safe 2015-12-07 05:30:19 -08:00
Seth Alves
fff4e3e831 make SpatiallyNestable setters take values by reference 2015-12-06 12:01:30 -08:00
Seth Alves
a948ae5f19 children of avatar joints might be right, now 2015-12-06 10:48:00 -08:00
Seth Alves
edc312199d rename a method to match convention in https://docs.google.com/document/d/1LFCmkK26JMVs8Ci33L4Yrle6lL7UU7oxthsWfddzZXQ/edit# 2015-12-06 06:16:47 -08:00
Seth Alves
ea65ef964f fix an AC race/crash 2015-12-04 11:13:36 -08:00
Seth Alves
6f79b381f9 working toward making children of avatar joints work 2015-12-03 11:00:06 -08:00
Seth Alves
2d804555de minor cleanups 2015-12-03 08:59:15 -08:00
Seth Alves
9b54924524 edit.js can now manipulate children without flipping the table 2015-11-30 16:21:14 -08:00
Seth Alves
4b87e09848 clean up some unneeded consts. get edit.js closer to working on parented entities 2015-11-30 13:23:55 -08:00
Seth Alves
4add3e2e91 rework worldToLocal, start on allowing scripts entity position/rotation to always be in world space 2015-11-30 09:41:15 -08:00