HarryDE
-
Posts
14 -
Joined
-
Last visited
Posts posted by HarryDE
-
-
17 hours ago, Tut said:
The most likely cause is the collision of the bed is exported at around -2 offset. This is typically the case for models found in GTA_INT img archive, I don't know why that is.
I don't know if you're scripting-wise able to center pivot/axis of the collision to the game mesh or if your only option is to remodel the collision. For the latter solution I'm not sure if it's possible to use engineReplaceModel for other archives than gta3. I think not, at least not player.img. @HarryDE
I have checked this function in the map_editor and these object are buggy in the map editor too.
Is there any possibility to check the "offsets" of these elements? Because then I could just set another offset for this objects.
-
Hello. So I'd want to create an object on the cursor position. I have calculated everything, it works fine but there are some objects that do not fit to the calculation. I think the problem can be that the bounding box of this objects are also buggy and I don't know what should I change in my calculation.
Calculation:
local sx, sy = guiGetScreenSize() local relX, relY = getCursorPosition() cursorX, cursorY = relX * sx, relY * sy local camX, camY, camZ = getCameraMatrix() local cursorWorldPosX, cursorWorldPosY, cursorWorldPosZ = getWorldFromScreenPosition(cursorX, cursorY, 1000) local hit, hitX, hitY, hitZ, hitElement, normalX, normalY, normalZ = processLineOfSight(camX, camY, camZ, cursorWorldPosX, cursorWorldPosY, cursorWorldPosZ, true, true, true, true, true, true, false, true)
Picture about it: (The red lines show the bounding box of the object)
-
Hello. So I'd want to create an object on the cursor position. I have calculated everything, it works fine but there are some objects that do not fit to the calculation. I think the problem can be that the bounding box of this objects are also buggy and I don't know what should I change in my calculation.
Calculation:
local sx, sy = guiGetScreenSize() local relX, relY = getCursorPosition() cursorX, cursorY = relX * sx, relY * sy local camX, camY, camZ = getCameraMatrix() local cursorWorldPosX, cursorWorldPosY, cursorWorldPosZ = getWorldFromScreenPosition(cursorX, cursorY, 1000) local hit, hitX, hitY, hitZ, hitElement, normalX, normalY, normalZ = processLineOfSight(camX, camY, camZ, cursorWorldPosX, cursorWorldPosY, cursorWorldPosZ, true, true, true, true, true, true, false, true)
Picture about it: (The red lines show the bounding box of the object)
-
Any Ideas ? Because I still can't solve it
-
6 hours ago, NX_CI said:
how did you applied 4 textures on single object?
You can do that in 3ds Max.
- 1
-
6 hours ago, Tails said:
Instead of sending a PM, please clarify it here in this thread, so others can help too such as myself.
I explained him the problem better but actually he couldn't even help.
But I can copy here my explanation that I have written in my PM.
So I have a wall object that has 4 different textures. As this pictures shows: https://imgur.com/CSJBkSU ( Texture names: la_carp3, la_carp4, la_carp5, la_carp6 ) I checked them with shader_tex_names resource from MTA Wiki. But I'd have to get the name of the texture that I click on. For example, I click on the right side of the wall object then the function gives as result: la_carp3.
-
Still don't get it..
-
17 hours ago, JustinMTA said:
I'm not sure what he means exactly either,
But If I'm not mistaken I think he means that he wants to know which texture applies to each wall?
If you add me on something or PM me I'll help youSent you a PM
-
On 14/08/2019 at 07:05, ShayF said:
You can try this community script shader example that gives you texture names.
https://nightly.multitheftauto.com/files/shaders/shader_tex_names.zipYes, I know this script. But this is not the thing that I need. So I would have to get the texture name that the player clicks on because the wall object has 4 separeted textures on itself.
-
-
So there is the situation:
There is a wall object that has 4 different textures applied on different side of the object and I would have to get which side of the wall the player is hovering with the cursor. Is there any solution for it?
[HELP] Create Object on Cursor position
in Scripting
Posted
I'd appreciate if you could tell me your technique to get these offsets because there are lot of objects that I want to use and it would be a hard work to compile all the offsets. So I would do this hard work instead of you
Thanks in advance!