Комментарии:
Hi! I don't know why but my character faces the opposite way from the mouse, does anyone know how to fix this?
ОтветитьFor anyone trying to do this on godot 4 there are a few things you have to do differently: First you need to create a new variable called 'query' "var query = PhysicsRayQueryParameters3D.create(rayOrigin, rayEnd)" then you have to replace the var intersection shown in the video with "var intersection = space_state.intersect_ray(query)" (thanks to @rhevoramirez7969 for this) if this doesn't work or if you're getting an error that goes like "Nonexistent Function '...' in '...' " then I have no clue why but removing the rayOrigin and rayEnd variables and add "var" at the start of the rayOrigin and rayEnd In the _physics_procress() function works, and finally you have to replace "interesection.empty()" with "intersection.is_empty()"
ОтветитьThank you lad!
ОтветитьWhat a great explanation. Great job.
Ответитьthank you very much i was very tired of using diffrent methods and my brain eas going to explode you saved my life you are the best
ОтветитьWould this work in Godot 4?
ОтветитьNote: in Godot 4 its necessary to construct the query to call as argument for the intersection: var query = PhysicsRayQueryParameters3D.create(RayOrigin, RayEnd); var Intersection = SpaceState.intersect_ray(query), otherwise itwill not work ;)
ОтветитьNice video. What application you use to make these animations?
Ответитьthank you! you just made my project very nice and simple :) and the explanation was fantastic.
ОтветитьLesson learned from all this. I hate 3d in godot, my project mates wanted to make a 2.5D game, everything was going okay till we reached the weapons part. We require to throw the dynamite at a flying enemy so we put the enemy in front of the player sprite ( y co-rds for enemy 8 player y is 2), when it fires using above code it stops before or after the enemy node. I just am tired maybe I am seeing shit wrong again.
Ответитьspace_state.intersect_ray(origin,end) showing error in godot 4 alpha , it says that function expects 1 argument
Ответитьis there a way to ignore player?
ОтветитьThank you, thank you, THANK YOU!
ОтветитьNice Tutorial - works fine but is there a way to make the camera only follow on x and y axis ?
ОтветитьI understand why you pass in the translation.y to the look_at function (to convert the raycast to a straight line). But why does my rig appear to point at a position above it rather than at the same height?
ОтветитьThat was a really helpful video, but I am having a problem. I did everything exactly as in the video, but for some reason my character's mesh keeps pointing to the ground in the direction that the mouse is pointing. It's my fifth time watching the video to see if I've done any mistake (no joking), but I did everything the same.
ОтветитьIt doesn't work for some reason. I did everything correct, I think. What do you have when you open RIG up. I was wondering if I need to write the code above the process_function(delta) line? thanks for the video, I just wished I could get the object to move with the mouse.
Ответитьyou're a hero
Ответитьwhen i type + 2000 at rayend it does not work
Ответитьwhenever i point the cursor at any other mesh in my viewport, including character mesh, my character still "leans" towards it, setting the look_at argument does not work for me, any ideas ?
Ответитьочень помог этот гайд. спасибо
ОтветитьI was doing this exact same thing and found your tutorial just after my computer bluescreened to tell me to go to bed. :)
I didn't know that camera had project ray normal. That's ideal. I was expecting to use the UV coords of the camera and its origin and try to do it manually, this is much better.
Thanks buddy.
Yup, that was better that Godot docs, thanks a lot !
ОтветитьEverything is working but the fact that my character is flat on the ground
ОтветитьVery good tutorial, helped me a lot
ОтветитьA collision object in the Godot has a function: _on_StaticBody_input_event(camera, event, click_position, click_normal, shape_idx).
ОтветитьPls continue making random godot tut. Ur vids on point.
Ответитьhi thanks, it really helped to understand how to use raycast from camera, and look_at, have a question as im a beginner in programming in general, im thinking that i can use this raycast from camera to position characters cross-hair/cursor on ground, and make it follow mouse position. Im just stuck on "concept" how to implement it, i have interpolated camera, player node as a scene with childnode "Positiond3d" its target for interpolated camera to follow, crosshair node spatial, Should i raycast from Camera via script, and use own scripts for player node and crosshair node to change position(crosshair) and look at(player) ? im stuck accessing from player node, ray collision position. Maybe theres a better way ?
Anyway thanks for videotutorial!
Great great tutorial! Much thanks to you.
Ответитьmine sais parser Error: Unexpected token: Isentifier:rayOrigin
Ответитьawesome tutorial. subbed
ОтветитьAsset Download link?
Ответитьnice.
ОтветитьThis was incredibly helpful. Thank you! Looking forward to the next video.
ОтветитьAmazing, i helped me a lot. Thanks, good work mate.
ОтветитьWow. Stunning well explained! Keep that good stuff up pls!!!
Ответить