Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LocalObject.placeOnGroundProperly() Not working #2340

Open
1 task done
lLukDreams opened this issue Sep 14, 2024 · 1 comment
Open
1 task done

LocalObject.placeOnGroundProperly() Not working #2340

lLukDreams opened this issue Sep 14, 2024 · 1 comment
Labels
Class: bug Something isn't working

Comments

@lLukDreams
Copy link

Description of the problem

Function not working like expected
here an image how it looks:
image

Reproduction steps

code snippet used to reproduce:
const pos = new alt.Vector3(2263.779432781326,2912.091004910668,46.58113479614258) const obj = new alt.LocalObject("bkr_prop_coke_table01a", pos, new alt.Vector3(0,0,0), false, false, false, 25) obj.placeOnGroundProperly()

Expected behaviour

it is placed on the ground

Additional context

No response

Operating system

windows

Version

16.2.5

Crashdump ID

No response

Confirmation of issue's presence

  • By submitting this ticket, I affirm that I have verified the presence of this issue on the latest RC (Release Candidate) version available at the time of writing this ticket.
@lLukDreams lLukDreams added the Class: bug Something isn't working label Sep 14, 2024
@GVMP
Copy link

GVMP commented Oct 27, 2024

Make sure to wait for the creation, also spawn the object with noOffset "true"

const pos = new alt.Vector3(2263.779432781326,2912.091004910668,46.58113479614258)
const obj = new alt.LocalObject("bkr_prop_coke_table01a", pos, new alt.Vector3(0,0,0), true, false, false, 25)

try {
await alt.Utils.waitFor(() => obj.valid && obj.isSpawned);
obj.placeOnGroundProperly()
} catch(err) {
alt.logError("Placing object on ground properly failed: " + err);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Class: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants