Skip to content
View in the app

A better way to browse. Learn more.

LCPDFR.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Get a Vector3 position in a zone by name

Featured Replies

Hello,

 

Working on a mod that sends Callouts based on jurisdiction. Is there any way to get a random position inside a zone based upon zone name?

 

Example:

 

Vector3 sandyPosition = WorldZone.GetRandomZonePositionByName("SANDY"); // some place inside Sandy shore
Vector3 eventPosition = World.GetNextPositionOnStreet(sandyPosition);

// Now we have a random street position in Sandy Shores!

 

Edited by Brexin212
Fixed Title

  • Management Team

I don't think something like this exists, but there are a few things you could try. You could generate random positions until you find one that is in the zone you want (could be slow). You could also get the coordinates of zones of interest, this could be their center or anywhere really. Then using that position you could generate a few random positions and most will be in your target zone.

Please do not PM me unless really necessary (knowing you helps). If you think you need my attention in a topic, tag me.

  • Author

Ok, I will do that using a central coordinate for each zone. 

 

One more question though, is it safe to say that increasing a coordinate value by 1 is equivalent to 1m of distance? For example, if a street starts at an X coordinate of 1000, and We move 200 meters along that X coordinate, is our  X coordinate exactly 1200 in the game world?

  • Management Team
26 minutes ago, Brexin212 said:

One more question though, is it safe to say that increasing a coordinate value by 1 is equivalent to 1m of distance? For example, if a street starts at an X coordinate of 1000, and We move 200 meters along that X coordinate, is our  X coordinate exactly 1200 in the game world?

 

Yes, that's correct.

Please do not PM me unless really necessary (knowing you helps). If you think you need my attention in a topic, tag me.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Similar Content

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.