Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7607483
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T00:40:27+00:00 2026-05-31T00:40:27+00:00

I am trying to have a First Person Controller collide with a cube. Both

  • 0

I am trying to have a First Person Controller collide with a cube. Both the cube and controller have a rigidbody applied, with Is Kinematic set to false, they are physically colliding, but none of my functions are being called. (I have included all functions we tried to get this working with.)

I have a second cube configured to be a trigger, which works. Both my lecturer and myself don’t have any idea why it isn’t working.

The code applied to the cube is as follows:

var green : Material;

function OnControllerColliderHit () {
    print("OnControllerColliderHit");
    this.gameObject.renderer.material = green;
} 

function OnCollisionEnter(){
    print("OnCollsion");
    this.gameObject.renderer.material = green;
}

function OnCollisionStay(){
    print("OnCollsionStay");
    this.gameObject.renderer.material = green;
}

function OnTriggerEnter(){
    print("OnTriggerEnter");
    this.gameObject.renderer.material = green;
}

Here is a screenshot of my project setup: https://i.stack.imgur.com/Y4HED.png

Also, I am getting this problem in the Windows version of unity, I have created a fresh project to do this in both times.

** EDIT: ** I forgot to mention that the functions are called if the cube hits anything else (Such as the plane if the cube’s gravity is turned on), which makes me believe there is something I’m missing from the First Person Controller.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T00:40:29+00:00Added an answer on May 31, 2026 at 12:40 am

    I found my problem. I needed to add a capsule collider to the First Person Collider. It needed to be added, not replaced, as one of the scripts depends on another, which on second thoughts isn’t doing its job.

    The capsule collider needed to be a little bigger than the Controller, and the Cube’s rigidbody Collision Detection had to be set to Continuous Discrete.

    Probably not the best solution, but it works.

    https://i.stack.imgur.com/Ii8Ru.png

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Making my first steps with NHibernate, I'm trying to have it creating my Tables
I have the following problems: First: I am trying to do a 32-spaces bitwise
Im trying to develop my first ASP.NET MVC web app and have run into
I'm trying to build my first generic list and have run into some problems.
I am trying to write my first WCF project. I have created a project
First, I have already spent the past few hours trying to find a solution
I'm new to NHibernate and trying to create my first mapping. I have created
I have a form that emails information and am trying to add another person
I am trying to obtain first person in from a day(marked with user_log.userlog_log_type=1) and
Hy, I am currently trying to make a first person game.what i was able

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.