Jump to content
This site uses cookies! Learn More

This site uses cookies!

armedunity.com uses cookies to improve user experience.

By continuing to use this site, you agree to allow us to store cookies on your computer.

  • 0
Sign in to follow this  
fpsarmedunity

drag rigidboies script help ..issue

Question

Hi to all..I done some test with my drag rigidbody script  that includes mass pickup and stop distance...all works fine but  i have a weird issue on player movement with object picked ip.. as you cna see in the video attached..

Please login or register to see this link.

this is my script ..but i cannot figured to to solve this issue since i have this probem only on fpskit player( picked object seems to flip in front of the player camera when player move) and if i test it with standard unity fps controller all works as expecetd 

Please login or register to see this code.

 

Share this post


Link to post
Share on other sites

4 answers to this question

Recommended Posts

  • 0

I have no clue what goes wrong with your script, but take a look at mine which I share here - maybe it could work better ++

Please login or register to see this link.

 

 

Share this post


Link to post
Share on other sites

  • 0

Hi and thanks for your help and script.. bte my script problem is that held obcjet seems to flip ahead and  and back in really strange and rapid mode when player move and held..

you can see the issue after  20"  on video i linked to first post..

 

btw i modidied even the standard GraObjects scirpt that comes with fpskit 1.6 to suit my needs adding  rotation on held and max mass  for objects to be held by the player

 

butthis script has an issue related t othe kinematic state of the object when held so that obejct could penetrate static objects and meshes..

 

eventually even if you or someone else could tell me how make object to kinematic to collide wtih static object i can use this one eventually

here the script

 

Please login or register to see this code.

thanks again in advance...

Share this post


Link to post
Share on other sites
  • 0

solved by myslef (using the second scirpt posted by me) setting kinematic to true on grab object, and use gravity to false and blocking object constraints by script when object held by player. and unfreezeing  contraints and turn  gravity in  again when object is dropped by the player...

 

now my grab script works fine as i want and as expected andi can integrate it in my main project template.. and have pickup, throw object rotation by button when held by the player and collision detection so when player  held  object  and object collide with another static gameobject or with another ridigdbody gameobejct  it  falls.. this is to simulate contact between obejct and to prevent object flipping ,,,

 

btw thanks again. ..for all help....

  • Like 1

Share this post


Link to post
Share on other sites
  • 0

Good to hear you fixed it. Just wanted to say I believe the issue with the first script may have been caused by using the update function. I had a simple issue 3rd person follow cameras and it was bc I was using update which update is not called at the same time physics is called result in a jerking motion when moving

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...