• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
  • Help Room /
avatar image
1
Question by Beloudest · Jul 08, 2016 at 07:34 AM · physicsforcephysx

Isolating physics of item attached to a moving rigid body

Hi how are you all? I have a slight challenge to resolve for a key feature in my Vive game. Essentially I have some physics -based controls the user can interact with attached to my vehicle which is also a rigid body that gets moved by force. I am in a situation where the controls are being heavily affected by the force of the vehicle moving, which I suppose we can call G-Force. What I would ideally like to do is isolate the physics based controls from the force of the moving vehicle, does anyone have any idea how to achieve this?

Thank you

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by Beloudest · Jul 08, 2016 at 11:01 AM

I think I have found the only straightforward solution. Create a rigid body with Kinematic enabled and the connect the control to that rigid body with a joint and then use a transform and rotation follow script to move the kinematic rigid body with the vehicle and the controls will move along fine.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image twhyte · Aug 25, 2017 at 03:40 AM 0
Share

Thank you! this worked for me.

for anyone curious, a follow script is as simple as this

 using System.Collections;
 using System.Collections.Generic;
 using UnityEngine;
 
 public class Follow$$anonymous$$e : $$anonymous$$onoBehaviour {
     public GameObject toFollow;
 
     // Update is called once per frame
     void FixedUpdate () {
         transform.position = toFollow.transform.position;
         transform.rotation = toFollow.transform.rotation;
     }
 }
 

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

86 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Getting two Objects to the same direction with different speed 0 Answers

Door hinge joints 0 Answers

How to make rigidbody not effect movement while still using it for collisions? 0 Answers

Backspin of Sphere with Rigidbody 0 Answers

Centrifugal forces unity - confusing behaviour 0 Answers

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges