diff options
author | Anton Yabchinskiy <arn@bestmx.ru> | 2015-01-05 23:56:24 +0300 |
---|---|---|
committer | Anton Yabchinskiy <arn@bestmx.ru> | 2015-01-05 23:56:24 +0300 |
commit | a7875c586af74302584544d777b189f4cb85c393 (patch) | |
tree | f4929f77383d835b5be8b6e099b9db59000af610 /scene/3d/collision_object.cpp | |
parent | 4ab1bcde35a02cfe7b25d630720de1cc81ef5a1a (diff) | |
parent | 8c4dd8de3919b789eac1a0f030563008bdcd44f5 (diff) |
Merge branch 'master' of github.com:okamstudio/godot
Diffstat (limited to 'scene/3d/collision_object.cpp')
-rw-r--r-- | scene/3d/collision_object.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/scene/3d/collision_object.cpp b/scene/3d/collision_object.cpp index 82158405ea..9c388a2883 100644 --- a/scene/3d/collision_object.cpp +++ b/scene/3d/collision_object.cpp @@ -47,6 +47,11 @@ void CollisionObject::_notification(int p_what) { case NOTIFICATION_ENTER_WORLD: { + if (area) + PhysicsServer::get_singleton()->area_set_transform(rid,get_global_transform()); + else + PhysicsServer::get_singleton()->body_set_state(rid,PhysicsServer::BODY_STATE_TRANSFORM,get_global_transform()); + RID space = get_world()->get_space(); if (area) { PhysicsServer::get_singleton()->area_set_space(rid,space); |