Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • 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 /
avatar image
0
Question by Recons · Aug 21, 2014 at 09:24 PM · collisionrigidbodytrigger

RigidBody - GameObject moves but mesh stays!

I need to have moving GameObjects and I need them to be destroyed when they enter another GameObject.

To be able to detect when they enter the trigger, it seems they need to have RigidBody. I set IsKinematic so physics are not applied. Please note I would prefer not to use RigidBody, but it seems impossible to easily detect if the GameObject enters the trigger otherwise..

Now the problem is when I have 2 objects with RigidBody, the GameObjects move but not the render. Screenshot of the problem

Here's a screenshot of properties of one of the GameObjects and the GameObject they will enter Properties of moving GameObjects and the trigger GameObject

Code for the EnemyController

 using UnityEngine;
 using System.Collections;
 
 public class EnemyController : MonoBehaviour
 {
     public float velocity = 0f;
 
     void Update()
     {
         transform.position += new Vector3(0, 0, velocity * Time.deltaTime);
     }
 }
 

I need advice on how to set this up properly. Going mad over here.. Thank you!

untitled-1.jpg (50.1 kB)
2014-08-21_22-43-15.png (216.9 kB)
Comment
Add comment · Show 2
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 calmcarrots · Aug 22, 2014 at 01:40 AM 0
Share

It is a static object

avatar image Recons · Aug 22, 2014 at 08:54 AM 0
Share

Oh god. That was it! Thank you rutter. If you write it as an answer I'll accept it :)

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Rubens-Torres · Aug 22, 2014 at 03:21 AM

this is probably occurring because you put the collider object and one or more objects parented to it so can cause a problem because the object that has the render and collider may be colliding with something while the other has no render does not collide in nothing, and so goes his way alone, try putting all colliders on an object, and the object with the render as a child parented to it might work, sorry for the mistakes of writing I do not speak english very well I hope you understand ^^

Comment
Add comment · 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

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.

Follow this Question

Answers Answers and Comments

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

Troublesome collision detection when changing rigidbody.velocity directly 0 Answers

Collision between two kinematic rigidbody triggers 2 Answers

Player Falls Through Floor on Trigger 1 Answer

Change size and mass on collision 1 Answer

Detect 2 non kinematic triggers? 3 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges