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.

Search the Community

Showing results for tags 'oncollisionenter'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • GENERAL
    • Introduce yourself
    • Discussions
    • Showcase
    • Need help?
    • Seeking team members?
    • Offtopic
  • RESOURCES
    • Example Projects
    • Scripts
    • Shaders
    • Unity Tutorials
    • FPS Kit Tutorials
    • 3D models
    • Animated 3D Models
    • Graphic design
    • Textures
    • Sounds
    • Other
  • SELL | REQUEST
    • Sell
    • Request
  • Mars' Modular Multiplayer Photon FPS Kit's Topics
  • Mars' Modular Multiplayer Photon FPS Kit's Reviews
  • Mars' Modular Multiplayer Photon FPS Kit's Updates
  • Mars' Modular Multiplayer Photon FPS Kit's Tutorials
  • Busy People's Introductions
  • Photon's Tutorials
  • Photon's Photon General
  • Photon's Showcase

Categories

  • Free Projects
  • Free Assets
  • Game Demos
  • Photon's Files

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


YouTube URL


Facebook URL


Twitter URL


IndieGoGo URL


Kickstarter URL


IndieDB URL


GreenLight URL


Location:


Interests

Found 2 results

  1. Hi, I need help with "void OnCollisionEnter". I'm trying to change value of boolean when collision enters with "blue" tag. Other script changes "toggle" value to true before this script is executed. public bool toggle; void OnCollisionEnter(Collision collision) { if(toggle == true) { if(collision.collider.gameObject.tag == "blue") { //Change other boolen here } } }
  2. Hi! I have a scene in witch there is a player (charachter controller, fps input) that moves rigidbodies with this script: var pushPower : float = 1.0f; function OnControllerColliderHit (hit : ControllerColliderHit) { var body : Rigidbody = hit.collider.attachedRigidbody; if (body == null || body.isKinematic) { return; } if (hit.moveDirection.y < -0.3) { return; } var pushDir = Vector3 (hit.moveDirection.x, 0, hit.moveDirection.z); body.velocity = pushDir * pushPower; } If i apply this script to the drone (character controller and fps input) it does not move anything... (the drone is a second charachter activated with a script that deactivate the main player) I've tried to replace the function with OnCollisioEnter() but it does'nt move rigidbodyes (nothing in trigger, all objects with rigidbody attached)... Can you help me? RESOLVED: made child object at the drone with box collider (istrigger false) and rigidbody (iskinematic = true) dimensioned at the harms. Now the drone when is walking around pushes the rigidbodies of the room.
×
×
  • Create New...