GithubHelp home page GithubHelp logo

andreas1331 / ragemp-gtav-heightmap Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 9 KB

A height map file for GTA:V to be used on RageMP.

License: MIT License

C# 100.00%
gtav gtav-mod ragemp ragemp-server

ragemp-gtav-heightmap's Introduction

ragemp-gtav-heightmap

Originally written in 2018, so might be better solutions out there.

The repository contains a helpful file with Z-heights for any given X,Y coordinate in GTA:V. I originally wrote a client-side script in JavaScript back in 2018 that would teleport the player in a grid pattern and grab the heights around him using

entity.getHeight(X, Y, Z, atTop, inWorldCoords);

from https://wiki.rage.mp/index.php?title=Entity::getHeight This is not perfect, and I'm pretty sure that there exists proper height maps that would produce the same or something of higher quality.

The result of running the height grabber was the file data_file/GTAV_HeightMap_Data.data. All heights are within a bounded box with a lower left point and upper right point:

  • LOWER LEFT: (-4100,-4300)
  • UPPER RIGHT: (4300, 7825)

This covers the land of San Andreas and must of the surrounding waters. Beaware that some heights might be 0, but my experience is that this is only a few of them.

To use

Just invoke GetHeightAtXY(...) from MapDataLibrary as such:

float height = GetHeightAtXY(goto.X, goto.Y);
NAPI.Entity.SetEntityPosition(ply, new Vector3(goto.X, goto.Y, height));

License

Distributed under the MIT License. See LICENSE.txt for more information.

ragemp-gtav-heightmap's People

Stargazers

 avatar  avatar

Watchers

 avatar

ragemp-gtav-heightmap's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.