Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

how to add rigidbody in unity

Hi, I know you are learning game dev,awesome to add rigidbody you can do one thing you can simply
choose the gameobject on which you want to apply rigidbody component
remember that you have to go the inspector panel and click on plus
at the bottom
and search for rigidbody
and click Enter

Here you go:-- :)
Comment

add rigidbody with code unity

//You can add it as component or via script:

GameObject myGameObject = new GameObject("Test Object"); // Make a new GO.
Rigidbody gameObjectsRigidBody = myGameObject.AddComponent<Rigidbody>(); // Add the rigidbody.
gameObjectsRigidBody.mass = 5; // Set the GO's mass to 5 via the Rigidbody.
Comment

PREVIOUS NEXT
Code Example
Csharp :: access object property C# 
Csharp :: Edit file C# 
Csharp :: Show private fields in Unity Inspector 
Csharp :: c# handle dbnull value 
Csharp :: LINQ query on a DataTable C# 
Csharp :: .net core identity get user id 
Csharp :: c# loops 
Csharp :: winforms how to check for enter key 
Csharp :: how to skip bin/Debug/netcoreapp3.1/ on the reltaive path 
Csharp :: Reverse Coding Challenge 1 
Csharp :: unity tilemap get all tiles 
Csharp :: data annotations in asp.net core 
Csharp :: compact in laravrl 
Csharp :: convert number of days into months c# 
Csharp :: entity framework core db first 
Csharp :: how to create function in c# 
Csharp :: c# timer 30 seconds 
Csharp :: C# extract all of a property from a list of objcets 
Csharp :: c# Program to check if a given year is leap year 
Csharp :: c# recursion formula for the factorial 
Csharp :: convert object to iqueryable in c# 
Csharp :: using in c# 
Csharp :: c# iterate sorteddictionary 
Csharp :: visitor pattern 
Csharp :: print pdf in c# 
Csharp :: get mouse inpuit new input system 
Csharp :: unity check if gameobject is inside collider 
Csharp :: check if two date ranges overlap c# 
Csharp :: Why Duplicate "..TargetFrameworkAttribute" c# assemblies created 
Csharp :: monogame delta 
ADD CONTENT
Topic
Content
Source link
Name
1+5 =