Search:
Type: Posts; User: Cambalinho
Search:
Search took 0.02 seconds.

June 29th, 2020, 03:59 PM
how can i rotate the 3D axis?
i have these 2 functions(i must convert degrees to radians)(forget been VB6 code.. i just need rotate from player position):
Private Function...

June 29th, 2020, 03:38 PM
i have a calculation for convert 3D vectors to 2D vectors:
(isn't a C++ code, but you get the point)
Private Function ConvertPositon3DTo2D(Position As Position3D, World3DSize As Size3D) As...

June 27th, 2020, 01:43 PM
2kaud these function convert the 3D to 2D and add the vector to center of the screen: "+ World3DSize.Width / 2"
if i use the camera position zero(from the window) and the size(from window), how can...

June 10th, 2020, 03:41 PM
i'm learning how create a 3D world just using Math.
until here i can draw lines and a plane.
now i'm moving the player(nothing, just moving) and the plane is moved. when i get far the plane is...

i have 2 positions 3D on NewPosition3D array.
i'm testing if the Z position is outside camera and if is, i must save that position:
If ((NewPosition3D(0).Z) > Camera1.Position.Z) Then
...

i have these function for convert 3D point to 2D point:
Private Function ConvertPositon3DTo2D(Position As Position3D, World3DSize As Size3D) As POINTAPI Dim ConvertedPosition As POINTAPI
...

"Just because the points Destiny and Origin are the same.
And it is up to you to prove whether it is possible and if it is then by what conditions."
because i was wrong using the actual line point...

wolle see these calculation:
AB.X = Destiny.X  Origin.X
if Destiny is the same of Origin, the AB.X is zero.
yes i test point by point for get the right result... maybe i must use the same line...

when:
AB.X = Destiny.X  Origin.X
AB.Y = Destiny.Y  Origin.Y
AB.Z = Destiny.Z  Origin.Z
are zero, how can i calculate the 'T'?
T = (ActualPosition  Origin.X) / AB.X

let me ask you anotherthing: when i get the point from GetLinePosition(), i notice 1 thing: the floor isn't there for some Z pixels... so the best is change the player.Z to player.Z100... i'm tell...

testing and review the code(with more help before of these problems):
1  the floor is drawed(the left line): from bottom left to top left.. and both have the same X,Y and the Z is changed.;
2 ...

when i calculate the 'T', how i know the Z or X or Y is from the line?
is only compare, before calculate the 'T', if Z(or X or Y) belongs between the OriginX and DestinyX?

thanks for all... maybe now the Wolle notice more easy ;)
thank you

wolle?
please VictorN can you disable the 'RESOLVED'?

i'm sorry, but i can't rate you now: forum rules... sorry

thanks VictorN.. thank you
but was only the code or too the language?

thank you so much for all.. thank you.
i get the same result, because the 1st collision point is wrong
but now i have the function corrected:
Private Function GetLinePosition(Origin As...

correct me more things:
 the AB it's the destiny point line minus origin point line, right?
 knowing the Z, how we calculate the T?
T = AB.z  Z
is these correct?
wow i forget the O point.......

i'm sorry, but i need show you something:
(i'm sorry but, for now i'm using VB6... but you understand the code easy)
when i do:
If (IsCollision3D(Camera1.Position, Camera1.Size, Position, Size)...

for i get the point on a 3D line, i use these function:
Position3D GetLinePosition(Position3D Origin, Position3D Destiny, double ActualPosition, Coordenates WhatCoordenate = Z){
//...

yes... now it's the same.
thanks for all... now i must create a new topic for the next created function.
thank you

yes i added the parentheses... but seen your code: where is X and Y? maybe it's another way for get the 3D collision...
i'm trying using the same function for see if the line origin is inside the...

i did a 3D collision function:
bool IsCollision3D(Position3D ObjectPosition1, Size3D ObjectSize1, Position3D ObjectPosition2, Size3D ObjectSize2) {
return ((ObjectPosition1.X
...

2kaud: true and i have the function updated:
'Draw array Vertices:
Private Type POINTAPI
X As Long
Y As Long
End Type
Private Declare Function Polygon Lib "gdi32" (ByVal hdc As...

April 9th, 2020, 01:09 PM
why they always use Matrix?
i don't know about it... i didn't learned on school(12º) :(

Click Here to Expand Forum to Full Width
OnDemand Webinars (sponsored)
