Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

223
Views
Choose empty spot on x and z axis

If I want to spawn objects around a target, do I have to use the magnitude command like:

Instantiate (enemy, spawnLocation.magnitude, transform.rotation); 

(or something like this)

Or do I have to use something else? Thanks in advance :)

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

The second parameter to Instantiate is a Vector3 relating to the position. Magnitude should return a float.

The easiest thing to do is to user Random.Range to get a random number. Take that number and add it to the X and/or Z of the target's position.

Let me know if you want some example code and I will see what I can do.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!